Joined: Fri Dec 03, 2004 4:41 pm Posts: 15
|
I have a class, MyClass that works great for other queries. I'm trying to do a subquery using one of its columns to see if that value is in another non-mapped table's rows. Is that possible? This si the exception I keep getting.
Hibernate version:
2.1
Full stack trace of any exception that occurs:
net.sf.hibernate.QueryException: in expected: i [select count(*) from mypackage.MyClass where our_id in (select our_id from OUR_TABLE i where other_id=1300) order by Date_DT DESC]
at net.sf.hibernate.hql.FromParser.token(FromParser.java:102)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:124)
at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:212)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:295)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1571)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1542)
<OUR CLASSES>
Name and version of the database you are using:
Oracle 9
|
|