Hi, my mapping file are:
Code:
<hibernate-mapping>
<class name="Company" table="empresa">
<id name="cnpj" column="cnpj">
<generator class="assigned"/>
</id>
<property name="name" column="nome"/>
<property name="corporateName" column="razao_social"/>
<property name="address" column="logradouro"/>
<property name="number" column="numero"/>
<one-to-one name="monthlyFee" class="MonthlyFee"
constrained="false" outer-join="true"/>
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="MonthlyFee" table="mensalidade">
<id name="cnpj" column="cnpj">
<generator class="foreign">
<param name="property">company</param>
</generator>
</id>
<one-to-one name="company" class="Company"
constrained="true" outer-join="false"/>
<property name="value" column="valor"/>
</class>
</hibernate-mapping>
but when I use sessionCreateQuery("from Company");
it returns the ArrayList of Company, where within this bean has
the monthlyFee object. So within monthlyFee has company again
an so on.
I don