|
I have defined the two objects "Category" and
"Document" with a many-to-many relationship (using a mapping table) such that
Category contains many documents and Document is part of many Category(s). Each
type of object contains a Collection of the other type of object. Now I'm
looking for guidance in what the query should look like to locate all Documents
that are a member of a particular category. Assuming the Document class has an
attribute of type "Collection" called "categories", what would the query look
like?
"select d from " +
Document.class.getName() + " d where d.categories (???What goes
here???) ");
Thanks in advance,
Shannon Kendrick
|
