• Post Reply Bookmark Topic Watch Topic
  • New Topic

BMP relations  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, it is just a question about relations in EJB.
in Order and LineItem example, the Order entity bean could have an ArrayList of LineItems(the two beans are BMP).
this ArrayList will contain the primary keys of lineitems.
or we can use a vector of stubs.
my question is:
which way is better for modeling relations between BMPs?
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another 3rd approach is not to have 2 EJBs, but only one EJB Order.
OrderlineItems could be a member variable in your Order EJB. This could be an ArrayList of LineItems, where each LineItem contains the data loaded from the table. This might give you a better performance for a BMP based solution.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!