Problem occurs when:
- Execute a query containing 2 checks on a Timestamp field
- Table contains records which have NULL values for this field
Stack trace snippet
The generated code also looks wrong for date fields.
Other types of fields do not have this problem. Below is what the generated code looks like in the case of a String field. On line 20 there is a null check. This is the type of check that needs to be generated for Timestamp fields as well.