mirror of https://github.com/apache/openjpa.git
OPENJPA-1442 JPA2 java.sql.Date, java.math.BigDecimal, or java.math.BigInteger types as derived primary keys are not Enhanced correctly
Fix testcase to avoid inserting duplicate keys. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@893794 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a0e001e40a
commit
5607a959ab
|
@ -43,14 +43,14 @@ public class TestDerivedIdentity extends SQLListenerTestCase {
|
|||
EntityManager em = emf.createEntityManager();
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
long time = (long) (System.currentTimeMillis() / 1000)+i;
|
||||
long time = (long) (System.currentTimeMillis() / 1000)+i*1317;
|
||||
BigDecimal did = new BigDecimal(time);
|
||||
EBigDecimalID e1 = new EBigDecimalID(did);
|
||||
EDBigDecimalID e2 = new EDBigDecimalID(e1);
|
||||
em.persist(e1);
|
||||
em.persist(e2);
|
||||
|
||||
int time2 = (int) (System.currentTimeMillis() / 1000)+i;
|
||||
int time2 = (int) (System.currentTimeMillis() / 1000)+i*7131;
|
||||
BigInteger iid = new BigInteger(Integer.toString(time2));
|
||||
EBigIntegerID e3 = new EBigIntegerID(iid);
|
||||
EDBigIntegerID e4 = new EDBigIntegerID(e3);
|
||||
|
|
Loading…
Reference in New Issue