[CDBI] Joins & custom relationships
Matt S Trout
dbix-class at trout.me.uk
Sat May 6 15:58:06 BST 2006
Kate Yoak wrote:
> 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.
The whole thing's a bit of a nasty hack, since I had to stuff it in at
the SQL::Abstract stage of things for various reasons. The approach I've
used in DBIx::Class is much better, but I'm not sure the metadata it
needs exists at all under Class::DBI and I don't have the time to
revisit Sweet given the only code I have left using it is now in
maintenance mode pending replacement.
More information about the ClassDBI