[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5021) HQL for one-to-one associations is not fully bi-directional
Fol De Rol (JIRA)
noreply at atlassian.com
Thu Mar 18 09:33:31 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35876#action_35876 ]
Fol De Rol commented on HHH-5021:
---------------------------------
Sorry, query 3 is also invalid
> HQL for one-to-one associations is not fully bi-directional
> -----------------------------------------------------------
>
> Key: HHH-5021
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5021
> Project: Hibernate Core
> Issue Type: Bug
> Components: core, query-criteria, query-hql
> Affects Versions: 3.3.2
> Reporter: Fol De Rol
>
> Let's assume we have two entities A and B mapped to each other with a bi-directional one-to-one association. Let A.b and B.a are appropriate linked attributes, and A owns the association. Let's try the following HQL queries:
> 1. from A where b is null
> 2. from B where a is null
> 3. from B where a.b is null
> Query 1 works correctly.
> Query 2 produces a wrong SQL expression.
> Query 3 works, though produces a redundant SQL query.
> My opinion is that query 2 should also be valid.
--
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