Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:[/last version (3)]
I have the following mapping :
<hibernate-mapping>
<class name="B" table="business_rules" node="B">
<composite-id name="id" class="hibernate.model.BusinessRulesPK">
<key-property name="brsid" column="BRS_ID" type="long" node="@id"/>
<key-many-to-one name="A" column="qid" class="hibernate.model.QueryEvents" />
</composite-id>
</class>
</hibernate-mapping>
As you can see the "B" obj has relation many to one to "A" obj.
The Xml look like this :
<A qid="1">
<busines_rules>
<B id="3" name="" recipe_name=""/>
</busines_rules>
</A>
I got the following error:
ids for this class must be manually assigned before calling save(): hibernate.model.B
I saw that there was already bug for composite-id(HHH-248), but this is not the same issue.
Please . Please Please Please Please Please Please Please Please Please
Does any body know how to define the Xml mapping in oder that the id will be taken from the "id" node and the second part lof the composite-id will be taken from "A" obj
Thank you very much.
You are great