i have another collection associated and that is been fetched ok...
some part i din't mentioned is that Child is a subclass of other class, so at database level the idFather column doesn't exist in the Child table...
i'm affraid that is the problem but if so, how do i overcome it ??
the thing is, i want Father to have a collection of Child, not of the superclass of it, this are the table definitions:
Code:
Father Thing Child
------ ---------- ---------
id id id (PK FK that references Thing.id)
name name color
idFather
this is the mapping for Child in Thing.hbm.xml
Code:
<class name="Thing" table="thing" >
<id name="id" type="int" unsaved-value="0" >
<generator class="identity" />
</id>
<property name="name" type="java.lang.String" not-null="true" />
<!-- bi-directional many-to-one association to Usuario -->
<many-to-one name="father" class="Father" not-null="true" >
<column name="idFather" />
</many-to-one>
<joined-subclass name="Child" table="child" >
<key column="id"/>
<property name="name" type="java.lang.String" not-null="true" />
</joined-subclass>
</class>
thanks for your comments