Wow John, my exact question is answered in that bit of the doc, I feel pretty silly for missing it.
Thanks for the pointer. You should see me with my working program right now. I am dancing I am so happy. Also, I cannot tell you guys how much I love this module. Top 5 from CPAN easily. My life is about 90% easier now, well, the part of my life spent at work writing code for databases. You get my drift. Fantastic piece of software y'all got here. -Neal On Jan 7, 2007, at 12:36 PM, John Siracusa wrote: > On 1/7/07 3:08 PM, Neal Clark wrote: >> I want to call get_objects on A::Manager with constraints for C, >> but I don't >> know how to setup that relationship in class A, or if it is even >> possible. >> i.e. I want to be able to say >> >> my $iterator = A::Manger->get_objects( >> query => [ >> data => { regexp => 'blah' }, >> b.data => { regexp => 'blah2' }, >> c.data => { regexp => 'blah3' }, >> ], >> require_objects => [ 'b','c' ], >> ); >> >> but A::Manager can't require object C because there is no >> relationship setup >> for it. > > You've got the right idea, but the wrong syntax. Try this: > > $iterator = > A::Manger->get_objects( > require_objects => [ 'b.c' ], > query => > [ > 'data' => { regexp => 'blah' }, > 'b.data' => { regexp => 'blah2' }, > 'b.c.data' => { regexp => 'blah3' }, > ]); > > IOW, since you're making a call using the A manager and A is the > primary > table, all related objects are addressed "starting from" a > relationship in > A. > > The chaining syntax is described in the get_objects() docs under > the "query" > parameter: > > http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/ > Manager.pm#que > ry > > Same deal for the require_objects parameter and docs. > > -John > > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Rose-db-object mailing list > Rose-db-object@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rose-db-object ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object