ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregg D Bolinger <gthou...@gmail.com>
Subject n+1 relation table
Date Wed, 18 Jan 2006 00:46:41 GMT
I've search the archives and have found a few similar issues but nothing
conclusive to what I am doing.  I can only assume no one else has this
problem because they know what they are doing and I don't (most likely) or
no one is simply doing things the way I am doing them.  At any rate...

I have a table called items and this table contains a fk to a type_id from a
table called type.  I then have a 3rd table called items_types which
contains an item_id and a type_id.

Got that?  So in my Item class I will need to get a List<Type> of types.  I
know how to do the n+1 solutions but  by adding in this third table I am at
a loss on how to map it.  If anyone could point me into the right direction,
I would appreciate it.  A link to an archived question, a page in the user
docs, etc.

Thanks a bunch.


View raw message