[hibernate-users] Query for an embedded property over a join fails - is this supported ?

Miroslav Pokorny miroslav.pokorny at gmail.com
Tue Aug 24 23:38:52 EDT 2010


   -  Hibernate Core <http://hibernate.jira.com/browse/HHH>
   - HHH-4581 <http://hibernate.jira.com/browse/HHH-4581>

Embedded objects in criteria API does not
work<http://hibernate.jira.com/browse/HHH-4581>

   -  *Type:* [image: Bug] Bug
   -  *Status:* [image: Resolved] Resolved
   -  *Priority:* [image: Blocker] Blocker
   -  *Resolution:* Fixed
   -  *Affects Version/s:*  3.5.0-Beta-2
   -  *Fix Version/s:*
3.5.0-Beta-3<http://hibernate.jira.com/browse/HHH/fixforversion/10981>
   -  *Component/s:*
entity-manager<http://hibernate.jira.com/browse/HHH/component/10331>,
   query-criteria <http://hibernate.jira.com/browse/HHH/component/10152>

Seems to imply that its fixed when using an EM but i cant get it work when
using the Hibernate Criteria API. The property inside the embedded component
over a join is never resolved and i get a Caused by:
org.hibernate.QueryException: could not resolve property: x.x.x.X of: Y
    at
org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:81)
    at
org.hibernate.persister.entity.AbstractPropertyMapping.toColumns(AbstractPropertyMapping.java:96).

If i recall without the join the embedded component may appear in a built
criteria and works fine. My query is recursive, think directory can have
another directory as its parent and i wish to query for a directory with a
"path". The name portion of the directory is embedded.

Should this work ?
tya
mP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-users/attachments/20100825/540e954b/attachment.html 


More information about the hibernate-users mailing list