-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate 3.2.0.cr2 cant filter composite-element?
PostPosted: Mon Jun 26, 2006 11:31 pm 
Newbie

Joined: Tue Jan 25, 2005 10:07 pm
Posts: 4
xx.hbm.xml
<class table="T_TPXW" name="TTpxw" lazy="true"..>
<id name="CBH" column="C_BH" type="string" unsaved-value="null">
<generator class="uuid.hex"/>
</id>
<list name="TTpxwTps" table="T_TPXW_TP" inverse="false" lazy="true" batch-size="10" cascade="all-delete-orphan">
<key column="C_BH" not-null="true" />
<list-index column="N_XH"/>
<composite-element class="TTpxwTp" >
<property column="C_BT" name="CBT" .....
</composite-element>
</list>
</class>

If I try something like that:


TTpxw tpxw = (TTpxw)new session.load(TTpxw.class, "2c9090a00b47a5b9010b47a6d9540001");

List list = s.createFilter(tpxw.getTTpxwTps(), "").setFirstResult(1).setMaxResults(10).list();


then

Hibernate: select ttpxw0_.C_BH as C1_33_0_, ttpxw0_.C_XWBT as C2_33_0_, ttpxw0_.C_XWBT1 as C3_33_0_, ttpxw0_.T_XWNR as T4_33_0_, ttpxw0_.D_FBRQ as D5_33_0_, ttpxw0_.N_FBRDM as N6_33_0_, ttpxw0_.N_DJS as N7_33_0_, ttpxw0_.C_XWLY as C8_33_0_, ttpxw0_.N_TPZS as N9_33_0_, ttpxw0_.N_TPXSFS as N10_33_0_, ttpxw0_.N_TPHS as N11_33_0_ from T_TPXW ttpxw0_ where ttpxw0_.C_BH=?
org.hibernate.QueryException: collection of values in filter: this []
at org.hibernate.hql.ast.HqlSqlWalker.prepareFromClauseInputTree(HqlSqlWalker.java:204)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:672)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:544)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:227)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:159)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:127)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:83)
at org.hibernate.engine.query.FilterQueryPlan.<init>(FilterQueryPlan.java:24)
at org.hibernate.engine.query.QueryPlanCache.getFilterQueryPlan(QueryPlanCache.java:93)
at org.hibernate.impl.SessionImpl.getFilterQueryPlan(SessionImpl.java:1437)
at org.hibernate.impl.SessionImpl.createFilter(SessionImpl.java:1240)


Anyone can help me?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.