You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Phase Web and Multimedia <ma...@phase.ws> on 2002/12/11 16:35:55 UTC

MtoN Questions

I am confused as to how MtoN mapping retrieves collections. I have a
Category and an Article Table. An article can assigned to many categories
and likewise a category can contain many articles. I also have an
intermediate table that holds ARTICLE_ID and CATEGORY_ID. The
collection-descriptor is configured to perform the intermediate table
writing automatically because I have no addidtional descriptive info to
include in the intermediate table. My question how do I retrieve a listing
of articles under a certain category. When i run a normal Criteria and Query
on a Category object it's aritcle collection is empty. Vice Versa when I run
Criteria and Query on the Article the Category collection is empty. I read
that the auto-retrieve only works for the 1:n and 1:1. So where is a good
simple working example of how to use the m:n to retrieve an associated
collection?

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws