[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5567) To avoid default primary key coming in the order by list
Satheeskumar (JIRA)
noreply at atlassian.com
Thu Sep 16 00:34:22 EDT 2010
To avoid default primary key coming in the order by list
--------------------------------------------------------
Key: HHH-5567
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5567
Project: Hibernate Core
Issue Type: Task
Components: annotations
Reporter: Satheeskumar
I am using hibernate to generate run time query using createQuery method by mapping my all classes into DB tables. But in the generated query primary key field is coming at first in order by list. I dont want to order by primary key. Instead i want to order by another seqNo field at first. Can anybody advice me how to remove the default primary key ordering in the resulting query.
Ex: Select A1.a,B1.b,C1.c from A A1,B B1,C C1 order by B1.b
Here A1.a is the primary key. this key filed is coming in the resulting query like
"Select A1.a,B1.b,C1.c from A A1,B B1,C C1 order by A1.a,B1.b" But I dont want to sort by A1.1 and want to sort by B1.b
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list