Hi there! I have a few questions related to this topic, wish you guys could help me:
1st - I can't remember, do the entities used in a relation must lie in the same jar? Or could they be distributed in diffent jars in a unique ear?
2nd - In a relationship, when adding a parent and a child, don't the CMP engine adds the child automatic for me? Do I need to transverse the Collection and call childhome.create() for each child of a given parent?
3rd - kinda related to the question above. I know that deletes can be "cascaded" what about updates? Do I need to transverse the Collection either or in this case it's a different scenario?
Thanks all
Vinicius Carvalho
-
EJB Relationship questions (1 messages)
- Posted by: Vinicius Carvalho
- Posted on: October 08 2004 10:07 EDT
Threaded Messages (1)
- EJB Relationship questions by Kingshuk Bandyopadhyay on October 11 2004 04:16 EDT
-
EJB Relationship questions[ Go to top ]
- Posted by: Kingshuk Bandyopadhyay
- Posted on: October 11 2004 04:16 EDT
- in response to Vinicius Carvalho
do the entities used in a relation must lie in the same jar?
Yes
>2nd - In a relationship, when adding a parent and a child, don't the CMP engine adds the child automatic for me?
No. you will have to call childhome.create()
>I know that deletes can be "cascaded" what about updates?
Not sure I have understand the question. An update on a parent can't be cascaded to the children since after all they are different records in different tables.