Hibernate version: 3.1
Mapping documents:
Code:
<hibernate-mapping default-lazy="false">
<class name="com.coginfo.kf.bean.Categoria" table="KFT_CATEGORIA" select-before-update="true">
<id name="codint" type="long" unsaved-value="0">
<generator class="sequence">
<param name="sequence">KF_SEQ_CATEGORIA</param>
</generator>
</id>
<property name="cafdsc" type="string">
<column name="cafdsc" length="1000" sql-type="string" not-null="true"/>
</property>
<set name="categoriaRuoli" lazy="true" cascade="none">
<key column="codintctg"/>
<one-to-many class="com.coginfo.kf.bean.CategoriaRuolo"/>
</set>
</class>
</hibernate-mapping>
<hibernate-mapping default-lazy="false">
<class name="com.coginfo.kf.bean.CategoriaRuolo" table="KFT_CATEGORIA_RUOLO" select-before-update="true">
<composite-id name="id" class="com.coginfo.kf.bean.CategoriaRuoloPk">
<key-many-to-one name="codintctg" column="codintctg" class="com.coginfo.kf.bean.Categoria"/>
<key-many-to-one name="codintrul" column="codintrul" class="com.coginfo.kf.bean.Ruolo"/>
</composite-id>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
categorieDisponibili = service.getSession().createFilter(report.getCategorie(),"where this.categoriaRuoli.id.codintrul in (" + idlistaRuoli + ")").list();
Full stack trace of any exception that occurs:
org.hibernate.QueryException: could not resolve property: codintrul of: com.coginfo.kf.bean.CategoriaRuolo [where this.categoriaRuoli.id.codintrul in (141)]
Name and version of the database you are using: Oracle 9
Could anyone help me?? It's very important! thanks