I have an m:n relationship between two tables/classes
A and B, modeled with an A_TO_B intermediate table
in-between.

I'd like to get all the instances of B associated with
a given A as a Collection.  The SQL might look like:

SELECT * FROM B
WHERE 
B.B_ID = A_TO_B.B_ID AND
A_TO_B.A_ID = X;

where X is the value of the A.A_ID that I want.

Is Criteria.addEqualToColumn the right method, or
should I just toss in raw SQL using SQLCriteria?  How
do I get back the Collection if I use raw SQL?  Any
advice is most welcome.

Also, the list is broken on the db.apache.org Web
site.  Notes younger than 24Feb2003 don't appear. 
Thanks - MOD


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to