JDOQL ordering using primary key field


Page bloom
 
Edited

If a class does not have an attribute defined to be the primary key field but, rather, relies on DN creating the primary key column in the RBDMS table implicitly, is there any way to specify the default primary key colunn in the ordering clause:

e.g.

Query q = ....
q.setOrdering(score ascending, PRIMARYKEYCOLUMN ascending)

I know the column exists in the RDBMS table and could write the native SQL to set up ordering that included it but at the Java level there is no Java attribute to refer to it in JDOQL that I am aware of. 

Perhaps DN has some keyword that can be used to represent the underlying, implicitly created primary key field.




 

Join main@datanucleus.groups.io to automatically receive all group messages.