Hello all,
 
I was going through some documents related to JDOQL and I found that
they have made the db-objects with other db-objects as attributes for
maintaining foreign key relationship. Example:
 
Employee object represents the Employee table in the database. It has a
attribute department. Now the department itself is an db-object which
represents the Department table. So they are able to use the api of JDO
to make joins using setFilter. 
 
I checked some reversedb tools and they all make dbobjects with the id,
instead of the object itself. 
Example:
Employee object has an attribute named departmentid, instead of
department itself. I understand that the mapping is done in
repository_user.xml about the foreign key relationship. However, in the
above scenario, it is not possible to make join query using setFilter as
in JDO api. 
 
Please let me know if the second approach, of using the Id instead of
object itself is correct. If it is correct, how to make join? Will I
have to use the OJB API? Please help me in this regard. 
 
Thanks in advance.
 
Regards,
 
Vijay Sargunam
 
Icicle Consultancy,
 Web: www.icicleconsultancy.com
 

Reply via email to