Hi,
We have CMP2 beans on weblogic, when I migrated those to TomEE. It generated
orm file with one-to-many and many-to-one relationships.
Eg: For Emp and Dept entities, it generated ORM file with below mappings.
In Emp Enity
<many-to-one name="Dept_emps"/>
In Dept Enity
<one-to-many mapped-by="Dept_emps" name="emps">
<cascade>
<cascade-all/>
</cascade>
</one-to-many>
While starting the server, it is failing with the error "Dept_emps" not
found in Emp table. It is obvious that corresponding column is not in Emp
table, but it has DEPT_ID foreign key.
We usually put this many-to-one relationship in our hand written ORM file as
below.
<many-to-one name="Dept_emps">
<join-column referenced-column-name="DEPT_ID" name="DEPT_ID"/>
</many-to-one>
Can we customize generated ORM file so that it can produce <join-column>
element?
Please advise how to handle relationships in generated ORM file. Thanks in
advance.
Thanks!
Srinivas Atluri.
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/Customize-generated-ORM-file-for-one-to-many-relationship-tp4676821.html
Sent from the TomEE Users mailing list archive at Nabble.com.