I'm trying to convert an old database system to Salesforce and have decided to try out the Database.com Java SDK.
I have recently hit problem that I can't seem to find a work around related to a JPQL Query when searching for NULL or empty dates.
E.g.
select t from table where t.expiryDate is NULL or t.expiryDate = :today
This causes the following exception:
Caused by: [InvalidFieldFault [ApiQueryFault [ApiFault exceptionCode='INVALID_FIELD' exceptionMessage='
from Table__c p where (( p.Expiry_Date__c = 'NULL' ) OR (
^
ERROR at Row:1:Column:158
value of filter criterion for field 'Expiry_Date__c' must be of type date and should not be enclosed in quotes'
]
row='1'
column='158'
]
]
I'm assuming this is a bug in a beta release of the SDK as I don't believe it should be converting the NULL to a string, but please let me know otherwise and/or does anyone know a work around?