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 questions

 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some questions about ejbql which I want to be sure of. They are mentioned in the spec, but some mock answers I got made me doubt

1. An ejb query defined for a finder method cannot return entities other than the entity for which the query is defined. Is this true ?

For example, if I have two entities in unidirectional one-one relation with each other (entityA -----> entityB) then the query defined for entityA may not return entityB.

So, the query:

"select object(a.b) from EntityA as a" would be incorrect when it is associated with a finder method ?
But correct when associated with a select method ?


2. In that same relationship, entityB MUST have local interfaces and entityA may not list the accessor methods for the CMR fields in its remote interface but it is allowed to do this for the local interface ?

Thanks !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic