You also have findByPrimaryKey on each bean. Use it for adding specific bean
to the collection / relation.
Igor
> -----Original Message-----
> From: Ricardo de Souza Moura [mailto:ricsouzamoura@(protected)]
> Sent: Thursday, March 25, 2004 1:23 PM
> To: J2EEPATTERNS-INTEREST@(protected)
> Subject: EJB relationship
>
> Imagine that I have two Entity Beans A and B.
> The relashionship between them is mxn.
>
> A have a getBs() method that return a Collection of B and B have a getAs()
> method that return a Collection of A.
>
> if I want to put a B into the A, I need call the getBs() method from A and
> call add() from Collection, isn't it ?
>
> But when I call the getBs() method, the container load all Bs to A.
> Imagine
> if I had 1000000 Bs in the A.
>
> What is the solution to this challenge ?
>
> Thanks
>
> _________________________________________________________________
> MSN Hotmail, o maior webmail do Brasil. http://www.hotmail.com
>
> ====================================================================
> Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
> List Archive: http://archives.java.sun.com/archives/j2eepatterns-
> interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
> listserv@(protected)
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)