cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp comparison with EJB QL

Former Member
0 Kudos

Hi everybody,

I have an entity bean (CPM) that has a timestamp field.

For a finder method I'd like to use the following EJB QL statement:

SELECT OBJECT(p) FROM MySchema AS p WHERE p.myTimestamp >= ?1

Unfortunally I receive an error during deployment from my WAS 700:

Incorrect QL query: SELECT OBJECT(p) FROM MySchema AS p WHERE p.myTimestamp >= ?1, errors: line 1: Comparison '>=' not defined for dependent objects

Has anybody an idea why the timestamp comparison leads to an error. On other J2EE application servers this works without any problems.

Regards,

Markus

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try checking EJB QL 2.1 compatibility in persistent.xml

You can define CMP field as Long too.

Former Member
0 Kudos

I opend an OSS message at SAP for this issue.

The answer was that a comparison of timestamps in EJB QL is not supported by SAP WAS 700 and below.