Hi all :-)
I have a bean called Company that contains some children.
These children are the companies (List) attribute.
I need to update the description attribute into Company and
to update also the description attribute of the children (companies)
of this company
Code:
<hibernate-mapping>
<class name="Company" table="company">
<id name="idCompany" column="id_company">
<generator class="native">
<param name="sequence">seq_company</param>
</generator>
</id>
<property name="name" column="nome"/>
<property name="description" column="description"/>
<many-to-one name="companyParent" column="id_company_parent"
class="Company"/>
<bag name="companies" inverse="true" lazy="true" cascade="save-update">
<key column="id_company_parent"/>
<one-to-many class="Company"/>
</bag>
</class>
</hibernate-mapping>
How can I do this??
thanks!!!