db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Queries for M:N collections?
Date Wed, 01 Oct 2003 22:00:24 GMT
At 16:44 -0500 10/1/03, Joe Germuska wrote:
>I'm dealing with a case where I want to model an M:N relationship 
>between two objects of the same type.  I have a collection 
>descriptor modeled off of the example for this on the OJB site. 
>When I go to store, I'm getting a class cast exception...

For what it's worth, changing that property to a Collection 
definitely solved my problem.  Which leads me to the real question:

I need to construct a Query which selects collections for either 
direction of this relationship.  That is, Given a parent, I need to 
find all of its children, and given a child, I need to find all of 
their possible parents.

I can probably work this out with a QueryBySQL, but I'm trying to 
avoid that.  I don't see any methods on Criteria to set where I can 
set something like "property contains some member"...  Can anyone 

Thanks in advance,

Joe Germuska            
  "We want beef in dessert if we can get it there."
   -- Betty Hogan, Director of New Product Development, National 
Cattlemen's Beef Association

To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org

View raw message