Date
1 - 3 of 3
JDOQL ordering using primary key field
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. 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. |
|
JDO has
toggle quoted message
Show quoted text
"SELECT FROM mydomain.MyClass ORDER BY JDOHelper.getObjectId(this)" |
|
Thanks Andy, that worked well.
I used it within my setOrdering call: setOrdering("score ascending, JDOHelper.getObjectId(this) ascending); |
|