Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] ORDER BY RANDOM() in JPA?

No,  only those functions defined in the specification are guaranteed to be supported by all providers.  RAND() is not yet supported by our JPQL parser but please file an enhancement request.  Alternatively you could use native EclipseLink expressions which support custom functions or Native SQL.

cowwoc wrote:
suggests a more efficient implementation but depends upon the existence of
RAND(). Does JPQL guarantee the existence of all SQL-92 or SQL-99 functions?
Can I assume that RAND() is defined?


cowwoc wrote:

Is there a portable way to select N random rows using JPA? lists different vendor-specific
ways to do this but obviously I would prefer using a portable JPA query

Thank you,


Back to the top