Hi!

Maybe someone in the past has already met this issue, so sorry if I ask it 
again!
I've got 3 tables: employee, depts and tasks having 2 fk: one from employees to 
depts and  one from employees to tasks.
I've modeled both tables and relations using modeler.

After that I created a simple application when I want to create a detail form 
for an employee having info about emp, his task and dept.
When I use this form in "insert mode", I create an emp value object having two 
relations to dept and task "inner" value objects.
The problem arises when I commit that obj: Cayenne attempts to insert one 
record to task, one to dept and finally one for emp and this is wrong for me:
I want it only inserts one record for emp: task and dept already exists in the 
db!

For instance, Hibernate ORM provides an attribute for xml descriptor about 
relation between two objs: using this attribute it is possible to avoid inner 
value objects insertion (i.e. value objects related to the main value object, 
emp...)
How can I specify the same concept using Cayenne?

Thanks for the help,
Regards,
Mauro

Reply via email to