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

Yajun Shi (JIRA) noreply at atlassian.com
Fri Aug 18 20:03:19 EDT 2006


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2013?page=comments#action_23998 ] 

Yajun Shi commented on HHH-2013:
--------------------------------

Sorry for the confusion. The above comment came from me, a member of dev team in SourceLabs, Inc.

> 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