SQL generated for "select p for PObject p" is SELECT COUNT(t0.id) FROM POBJECT t0". This is valid and according to JPQL spec which does not accept COUNT.
However, JDBC Drivers for legacy databases may not always support COUNT(columnName) as reported in .
OpenJPA should support such cases with a boolean option DBDictionary.useWildCardForCount.
|Field||Original Value||New Value|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Fix Version/s||2.0.0-M4 [ 12314149 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|
|Attachment||OPENJPA-1440-1.2.x.patch.txt [ 12442867 ]|
|Attachment||OPENJPA-1440-1.3.x.patch.txt [ 12442885 ]|
|Fix Version/s||1.2.3 [ 12314517 ]|
|Fix Version/s||1.3.0 [ 12313326 ]|