[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-1570) criteria-api: filtering by key-many-to-one causes invalid sql
Christian Priebe (JIRA)
noreply at atlassian.com
Tue Sep 20 07:11:35 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43647#comment-43647 ]
Christian Priebe edited comment on HHH-1570 at 9/20/11 6:09 AM:
----------------------------------------------------------------
Is there any hope this issue will ever get resolved? It seems like this is known (as missing feature or as bug) since 2003 ( see https://hibernate.onjira.com/browse/HB-417 )
was (Author: christian.priebe):
Is there any hope this issue will ever get resolved? It seems like this is known (as missing feature or as bug) since 2003 ( see https://hibernate.onjira.com/browse/HB-417 )
Whoops, this should have been a comment referencing the issue and not the "changed assignment" message. Sorry for that!
> criteria-api: filtering by key-many-to-one causes invalid sql
> -------------------------------------------------------------
>
> Key: HHH-1570
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1570
> Project: Hibernate Core
> Issue Type: Bug
> Components: query-criteria
> Affects Versions: 3.5.3, 3.6.0.Beta1
> Reporter: Joris Verschoor
> Assignee: Steve Ebersole
> Attachments: HHH-1570-fix.patch, HHH-1570-it.patch, hibernate.patch
>
>
> We have a class Price that has a composite-id using a couple of key-properties and some key-many-to-ones)
> One of those is "transportation", which has a many-to-one to transportationType
> When we query using: criteria.add(Expression.eq("price.transportation.transportationType.id", transId);, we get an invalid SQL statement: The table of transportation was not selected.
> I will try to make a testcase today or tomorrow, depending on my schedule.. Things will be more clear by then...
> We have created a work-around, by mapping the transportationID twice: once in key-property, and once as a many-to-one. (instead of one key-many-to-one)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list