[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2013) While Using DetachedCriteria as subselect if the detached criteria has a subCriteria exception is being thrown

Dilip Ranjith (JIRA) noreply at atlassian.com
Fri Aug 18 03:43:19 EDT 2006


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.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list