[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2013?page=c...
]
SourceLabs, Inc. commented on HHH-2013:
---------------------------------------
Would you provide the mapping for Shop and StatusDTO as well as the SQL that gets
generated.
It would also help if you check the following to narrow down where the problem might be:
detachedCriteria.setProjection(Projections.id()); // -------------> use
Projections.id() instead.
ids = new LinkedHashSet(detachedCriteria .getExecutableCriteria(session).list());
Criteria criteria = session.createCriteria(StatusDTO.class);
criteria.add(Property.forName("transactionID").in(detachedCriteria ));
criteria.list()
While Using DetachedCriteria as subselect if the detached criteria
has a subCriteria exception is being thrown
--------------------------------------------------------------------------------------------------------------
Key: HHH-2013
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2013
Project: Hibernate3
Type: Bug
Versions: 3.0.5
Environment: HIbernate 3.0.5 Oracle
Reporter: Dilip Ranjith
While Using DetachedCriteria as subselect if the detached criteria has a subCriteria
exception is being thrown
DetachedCriteria detachedCriteria = DetachedCriteria.forClass(Shop.class);
detachedCriteria
.createCriteria("productDTO").add(Restrictions.eq("ID",
productCode.toString()));
shopSet = new LinkedHashSet(detachedCriteria .getExecutableCriteria(session).list());
---> Works correctly
detachedCriteria .setProjection(Projections.property("ID"));---------->
projection in DetachedCriteria
Criteria criteria = session.createCriteria(StatusDTO.class);
criteria .add(Property.forName("transactionID").in(detachedCriteria ));
criteria .list() --------------> (Gives exception)
Throws an SQLGrammerException
java.sql.SQLException: ORA-00904: "PRODUCTMAS1_"."PRODUCTID": invalid
identifier
--
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