Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ public void integerFieldTest() throws Exception {
getEntityTransaction().commit();
Integer_Field a1 = getEntityManager().find(Integer_Field.class, "3");
if (a1 != null) {
if (a1.getVersion() > version) {
if (a1.getVersion() == null) {
logErr("version is null for updated entity");
} else if (version == null || a1.getVersion() > version) {
logTrace( "version:" + a1.getVersion());
pass = true;
} else {
Expand Down Expand Up @@ -223,7 +225,9 @@ public void integerPropertyTest() throws Exception {
getEntityTransaction().commit();
Integer_Property a1 = getEntityManager().find(Integer_Property.class, "4");
if (a1 != null) {
if (a1.getBasicInteger() > version) {
if (a1.getBasicInteger() == null) {
logErr("version is null for updated entity");
} else if (version == null || a1.getBasicInteger() > version) {
logTrace( "version:" + a1.getBasicInteger());
pass = true;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ public void shortClassFieldTest() throws Exception {
ShortClass_Field a1 = getEntityManager().find(ShortClass_Field.class, "3");
log.info("shortFieldTest, a1="+a1);
if (a1 != null) {
if (a1.getVersion() > version) {
if (a1.getVersion() == null) {
logErr("version is null for updated entity");
} else if (version == null || a1.getVersion() > version) {
logTrace( "version:" + a1.getVersion());
pass = true;
} else {
Expand Down Expand Up @@ -230,7 +232,10 @@ public void shortClassPropertyTest() throws Exception {
getEntityTransaction().commit();
ShortClass_Property a1 = getEntityManager().find(ShortClass_Property.class, "4");
if (a1 != null) {
if (a1.getBasicShort() > version) {
if (a1.getBasicShort() == null) {
logErr("version is null for updated entity");
}
else if (version == null || a1.getBasicShort() > version) {
logTrace( "version:" + a1.getBasicShort());
pass = true;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ public void longClassFieldTest() throws Exception {
getEntityTransaction().commit();
LongClass_Field a1 = getEntityManager().find(LongClass_Field.class, "3");
if (a1 != null) {
if (a1.getVersion() > version) {
if (a1.getVersion() == null) {
logErr("version is null for updated entity");
} else if (version == null || a1.getVersion() > version) {
logTrace( "version:" + a1.getVersion());
pass = true;
} else {
Expand Down Expand Up @@ -221,7 +223,9 @@ public void longClassPropertyTest() throws Exception {
getEntityTransaction().commit();
LongClass_Property a1 = getEntityManager().find(LongClass_Property.class, "4");
if (a1 != null) {
if (a1.getBasicLong() > version) {
if (a1.getBasicLong() == null) {
logErr("version is null for updated entity");
} else if (version == null || a1.getBasicLong() > version) {
logTrace( "version:" + a1.getBasicLong());
pass = true;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ public void timestampFieldTest() throws Exception {
getEntityTransaction().commit();
Timestamp_Field a1 = getEntityManager().find(Timestamp_Field.class, "1");
if (a1 != null) {
if (a1.getVersion().after(version)) {
if (a1.getVersion() == null) {
logErr("version is null for updated entity");
} else if (version == null || a1.getVersion().after(version)) {
logTrace( "version:" + a1.getVersion());
pass = true;
} else {
Expand Down Expand Up @@ -134,7 +136,9 @@ public void timestampPropertyTest() throws Exception {
getEntityTransaction().commit();
Timestamp_Property a1 = getEntityManager().find(Timestamp_Property.class, "2");
if (a1 != null) {
if (a1.getBasicTimestamp().after(version)) {
if (a1.getBasicTimestamp() == null) {
logErr("version is null for updated entity");
} else if (version == null || a1.getBasicTimestamp().after(version)) {
logTrace( "version:" + a1.getBasicTimestamp());
pass = true;
} else {
Expand Down