Hi, Jakob! I've been having some trouble navigating this. (I suspect it's newbie problems.) I have m:n relationships working fine with a single pair of objects, but when I try to turn them on between four sets of objects I get exceptions in my JUnit tests.
They're all working in one direction (from top to bottom: A->B->C->D), but not bi-directionally. Another question: I hae a foreign key relationship between two classes where I want to pull two column values out of a table and populate member data in a class. I only see one table attribute in the <class-descriptor>. When I want to point to foreign key using <reference-descriptor>, it's almost as if I HAVE to map the value I want to a class with its own table. The repository.xml docs say that the table attribute on <class-descriptor> may specify a table different from the mapped table for the persistent class, but it's currently not implemented. Do I really have to wrap a java.util.Date in a separate class in this case, or is there another way to do it? Thanks - MOD --- Jakob Braeuchi <[EMAIL PROTECTED]> wrote: > hi michael, > > ojb handles non-decomposed m:n relationships > internally. there's no need > for you to deal with the intermediate table. > > jakob > > Michael Duffy wrote: > > >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] > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________________________ 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]