ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Rittinger <...@schnegg.net>
Subject multiple object references in n:m relationships?
Date Wed, 05 Oct 2005 16:00:39 GMT
Hello list,

I'm new to iBatis (DAO with SQL-Maps) and have a question concerning n:m 
relationships.  I already searched the list but could not come up with 
useful search terms.
If I implement such a relationship as described in the manual (the 
category with product list), am I right that I get different instances 
of product objects associated with categories, even if it's the same 
entry in the product table?

For example: categories a,b and products x,y,z where product x is in 
both categories a and b (a:x,y and b:x,z).  If I get a list of 
categories from the DB and their associated products than the Java 
object representing x in the product list of category a is not the same 
object as the one in b's list (i.e. not the same object reference)?

If so, is there a way to achieve this in iBatis or do I have to 
implement this manually in the DAO-implementation?

Thanks,	Frank

Mime
View raw message