Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to return information wanted but in different beans.  RSS feed

 
huanran liu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
situation:
Suppose I have two table: PERSON and BUYER.
attributes of PERSON : personID, name, age
attributes of BUYER: materialsID,personID
if I want to get such pieces of information as:
(materialsID , name)
I can write sql="select materialsID, name from PERSON, BUYER where PERSON.personID=BUYER.personID"
but In ejb-ql, there are two corresponding beans: PERSONBEAN, BUYERBEAN.
how to write ejb-ql statement so that I can get information above? and the return type is what?
Thanks!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!