Skip to content

Commit

Permalink
Merge pull request #55 from JavaWebStack/feature/non-null-dates
Browse files Browse the repository at this point in the history
Made dates fields not nullable
  • Loading branch information
JanHolger authored Mar 13, 2024
2 parents 26d84e4 + d361a2f commit 4d28913
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/javawebstack/orm/TableInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,15 @@ public Object getDefault(String fieldName) {
public boolean isNotNull(String fieldName) {
if (idField.equals(fieldName))
return true;

if (hasDates()) {
if (fieldName.equals(getCreatedField()))
return true;
if (fieldName.equals(getUpdatedField()))
return true;
}


return false;
}

Expand Down

0 comments on commit 4d28913

Please sign in to comment.