openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Subhash Sonkusaley <>
Subject JPA Criteria Query API and order by null last
Date Thu, 03 Sep 2015 16:08:18 GMT
Hi All,

We are using OPENJPA 2.0 and currently facing an issue while using Criteria Query Order By
clause. This issue comes when order by fields has at  least one NULL data in it.  We have
order by clause for string column and we don't have data in all rows for that column. Hence,
Criteria Query executes order by NULL. This would results in invalid results after query executions.
It's omitting all records which has NULL as data in that respective column.

We need to place order by in such a way that it would be behave just like NULL first and NULL
Last as in Oracle.

Also, I see that there is issue locked under JPA-SPEC project for same issue

Please let us know any solution to this problem.

Thanks & Regards,
Subhash Sonkusaley, System Analyst
Cybage Software Pvt. Ltd. (An SEI-CMMI Level 5 assessed & ISO 27001 Company)
Pune, India
Phone(O):91-20-66041700, Ext:6261

"Legal Disclaimer: This electronic message and all contents contain information from Cybage
Software Private Limited which may be privileged, confidential, or otherwise protected from
disclosure. The information is intended to be for the addressee(s) only. If you are not an
addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly
prohibited. If you have received this electronic message in error please notify the sender
by reply e-mail to and destroy the original message and all copies. Cybage has taken every
reasonable precaution to minimize the risk of malicious content in the mail, but is not liable
for any damage you may sustain as a result of any malicious content in this e-mail. You should
carry out your own malicious content checks before opening the e-mail or attachment."

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message