This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJBQL vs. relationships (CMR)

 
Georg Joo
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Sorry, I write this message for the second time, because I can't find the first.

I have following relationship :
project 1 --> participant 1 --> * services (uni)

Now I need a list about one special service with the names of the participants.

What's the best way to do this.
1. EJBQL with IN ...
or 2. define a bidirectional relationship
project 1 --> * services * --> 1 participant and use the CMR Collections ?

Is it a performance problem to have a lot of relations ??
E.g. my project is a central bean. Should I kepp the relationships down ?
 
Mudi Appu
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by this

project 1 --> participant 1 --> * services (uni)


Does it mean following cardinality?

Cardinality of project and participant is one to one and
Cardinality of participant and services is one to many



[ April 25, 2005: Message edited by: Kanishtha Kramalekhaka ]
 
Georg Joo
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I mean project to participant is one to many.

What I will know : What's the better way. To have many CMR Collections (relationships) e.h. my project or to get the list about EJBQL ?

Can it be a problem for the performance to have a lot of realtionships ?

regards

Georg
 
Mudi Appu
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Georg,
It is depending on your business requirements. If you only needs to get the list of names of participants (and you do not need to do anything more with participants objects) EJB-QL may be the better option. But keep in mind that; EJB_QL is not good in performance as SQL.
 
Georg Joo
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thannks

Regards

Georg
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic