How to return information wanted but in different beans.
posted 13 years ago
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!