Skip to content

Commit

Permalink
[jakartaee/persistence#637] TCK should not set version on entity manu…
Browse files Browse the repository at this point in the history
…ally
  • Loading branch information
beikov committed Jun 12, 2024
1 parent c64f588 commit ebb7924
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ public void createIntTestData() {
getEntityTransaction().begin();
getEntityManager().persist(new Int_Field("1"));
getEntityManager().persist(new Int_Property("2"));
getEntityManager().persist(new Integer_Field("3", new Integer(0)));
getEntityManager().persist(new Integer_Property("4", new Integer(0)));
getEntityManager().persist(new Integer_Field("3"));
getEntityManager().persist(new Integer_Property("4"));

getEntityTransaction().commit();
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ public void createShortTestData() {
getEntityTransaction().begin();
getEntityManager().persist(new Short_Field("1"));
getEntityManager().persist(new Short_Property("2"));
getEntityManager().persist(new ShortClass_Field("3", new Short((short) 0)));
getEntityManager().persist(new ShortClass_Property("4", new Short((short) 0)));
getEntityManager().persist(new ShortClass_Field("3"));
getEntityManager().persist(new ShortClass_Property("4"));
getEntityTransaction().commit();
} catch (Exception e) {
logger.log(Logger.Level.ERROR, "Unexpected Exception in createShortTestData:", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ public void createLongTestData() {
getEntityTransaction().begin();
getEntityManager().persist(new Long_Field("1"));
getEntityManager().persist(new Long_Property("2"));
getEntityManager().persist(new LongClass_Field("3", new Long(0)));
getEntityManager().persist(new LongClass_Property("4", new Long(0)));
getEntityManager().persist(new LongClass_Field("3"));
getEntityManager().persist(new LongClass_Property("4"));
getEntityTransaction().commit();
} catch (Exception e) {
logger.log(Logger.Level.ERROR, "Unexpected Exception in createLongTestData:", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,8 @@ public void createTimestampTestData() {

try {
getEntityTransaction().begin();
Timestamp currentTime = new Timestamp(new Date().getTime());
getEntityManager().persist(new Timestamp_Field("1", currentTime));
getEntityManager().persist(new Timestamp_Property("2", currentTime));
getEntityManager().persist(new Timestamp_Field("1"));
getEntityManager().persist(new Timestamp_Property("2"));
getEntityTransaction().commit();
} catch (Exception e) {
logger.log(Logger.Level.ERROR, "Unexpected Exception in createTimestampTestData:", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ public Integer_Field(String id) {
this.id = id;
}

public Integer_Field(String id, Integer basicInteger) {

this.id = id;
this.basicInteger = basicInteger;
}

public String getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ public Integer_Property(String id) {
this.id = id;
}

public Integer_Property(String id, Integer basicInteger) {

this.id = id;
this.basicInteger = basicInteger;
}

@Id
public String getId() {
return id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ public LongClass_Field(String id) {
this.id = id;
}

public LongClass_Field(String id, Long value) {

this.id = id;
this.basicLong = value;
}

public String getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ public LongClass_Property(String id) {
this.id = id;
}

public LongClass_Property(String id, Long value) {

this.id = id;
this.basicLong = value;
}

@Id
public String getId() {
return id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ public ShortClass_Field(String id) {
this.id = id;
}

public ShortClass_Field(String id, Short value) {

this.id = id;
this.basicShort = value;
}

public String getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ public ShortClass_Property(String id) {
this.id = id;
}

public ShortClass_Property(String id, Short value) {

this.id = id;
this.basicShort = value;
}

@Id
public String getId() {
return id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ public Timestamp_Field(String id) {
this.id = id;
}

public Timestamp_Field(String id, Timestamp basicTimestamp) {

this.id = id;
this.basicTimestamp = basicTimestamp;
}

public String getId() {
return id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ public Timestamp_Property(String id) {
this.id = id;
}

public Timestamp_Property(String id, Timestamp basicTimestamp) {

this.id = id;
this.basicTimestamp = basicTimestamp;
}

@Id
public String getId() {
return id;
Expand Down

0 comments on commit ebb7924

Please sign in to comment.