[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2106?page=c...
]
Diego Pires Plentz resolved HHH-2106.
-------------------------------------
Assignee: Diego Pires Plentz
Resolution: Rejected
Criteria c = session.createCriteria(LocalArea.class)
.createAlias("wideArea", "wa")
.add(Restrictions.eq("wa.country", country));
* criteria queries
------------------
Key: HHH-2106
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2106
Project: Hibernate3
Issue Type: New Feature
Components: query-criteria
Reporter: Toby
Assignee: Diego Pires Plentz
-localArea
-wideArea
- country
Imagine you want to query local area that belong to a country, independet of the
"wide area". But country is only references via a wide area and there is no
direct link between local area and a country.
You can not add wide area as a restriction as the problem ist, that you want all wide
areas....and you only need them to get to the county.....
Criteria c = session.createCriteria(LocalArea.class);
c.add(Restrictions.eq("wideArea", *));
c.add(Restrictions.eq("country", country));
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira