Skip to content

Commit

Permalink
switched java.util.Date field to timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
wizzardo committed Feb 25, 2024
1 parent 9b88b89 commit be9581b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ public TimestampField(Table table, String name) {
public Condition.FieldCondition eq(Timestamp l) {
return new Condition.FieldCondition(this, Condition.Operator.EQ, l, (o, builder) -> builder.setField((Timestamp) o));
}

public Condition.FieldCondition eq(Date l) {
return new Condition.FieldCondition(this, Condition.Operator.EQ, l, (o, builder) -> builder.setField(new Timestamp(((Date) o).getTime())));
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,10 @@ else if (cl == Long.class)
return Field.BooleanField.class;
if (cl.isEnum())
return Field.EnumField.class;
else if (cl == Date.class)
else if (cl == java.sql.Date.class)
return Field.DateField.class;
else if (cl == Date.class)
return Field.TimestampField.class;
else if (cl == Timestamp.class)
return Field.TimestampField.class;

Expand Down

0 comments on commit be9581b

Please sign in to comment.