RE: [CDBI] Joins & custom relationships
"Kate Yoak" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
OK, I did manage to figure it out. Looks like Class::DBI::Sweet::SQL::Abstract hardcodes the relationships within _resolve_join . For now, I simply included my own relationship in there. However, since there exists a mechanism for adding relationships - those which come standard shouldn't get special treatment. :-) It might be nice for a relationship to be able to register the data necessary to participate. -----Original Message----- From: classdbi-bounces-Ra3b/[email protected] [mailto:classdbi-bounces-Ra3b/[email protected]]On Behalf Of Kate Yoak Sent: Friday, May 05, 2006 5:25 PM To: Classdbi@Lists. Digitalcraftsmen. Net Subject: [CDBI] Joins & custom relationships Class::DBI::Sweet says MyApp::Artist->search({ 'cds.tags.tag' => 'Shiny' });This looks really cool, and most importantly it works! My question is - how do I make my custom relationship class participate? That is, what kind of information do has_a, has_many & might_have store in the object to make joins work? That part of the code is pretty opaque, and it's likely Matt or someone can tell me exactly what i am looking for right away :-) Cheers, Kate _______________________________________________ ClassDBI mailing list ClassDBI-Ra3b/[email protected] http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi