Handeling one-to-many relation manualy in EJB1.1.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nayyer_Kamran
Posted On:   Wednesday, April 18, 2001 04:21 AM

How we can handel one-to-many relation in EJB1.1, if both table are CMP beans. e.g: if A(one side bean) and B(many side bean) are two beans then can we call the bhome.create() or create of B many times, while we are remains in the create method of A.is it possible. There are two things should be consider 1:A has yet not created in Database as it is still in its create method. and in database we could have the Foreign key constraint. 2:A and B are of the part of different transaction. What container haults the A's tracation and starts B's trasaction. does making them the part of the same transaction would do the magic. Thanks Nayyer    More>>

How we can handel one-to-many relation in EJB1.1, if both table are CMP beans.
e.g:
if A(one side bean) and B(many side bean) are two beans then can we call the bhome.create() or create of B many times, while we are remains in the create method of A.is it possible.

There are two things should be consider

1:A has yet not created in Database as it is still in its create method. and in database we could have the Foreign key constraint.

2:A and B are of the part of different transaction. What container haults the A's tracation and starts B's trasaction.
does making them the part of the same transaction would do the magic.

Thanks
Nayyer

   <<Less

Re: Handeling one-to-many relation manualy in EJB1.1.

Posted By:   AlessandroA_Garbagnati  
Posted On:   Wednesday, April 18, 2001 08:52 AM

Hi,

No, actually I don't think that this will be the magic. I handle all the relationships inside the session beans that control my operations.

If you take a look to the EJB 2.0 specifications, they have finally added the concept of relationships betweens entity beans.
About | Sitemap | Contact