[Dbix-class] Feature request: complex join

Eden Cardim edencardim at gmail.com
Mon Jul 4 23:22:06 GMT 2011


>>>>> "Dmitry" == Dmitry Belyavsky <beldmit at gmail.com> writes:

    Dmitry> Greetings!
    Dmitry> I want to add a custom has_many relation with comlex join. I use the
    Dmitry> PostgreSQL, so the condition should look like me.email =>
    Dmitry> ANY(foreign.emails), but now DBIx::Class does not support such join.
    Dmitry> Is it possible to implement such join conds?

You might want to look at the 0.08190_01 trial release which adds the
ability to create relationships based on arbitrary joins. Specifically:

http://beta.metacpan.org/module/FREW/DBIx-Class-0.08190_01/lib/DBIx/Class/Relationship/Base.pm

Although I'm not sure what the current state of that feature is.

Also, why don't you just normalize your emails field into a table so you
can benefit from the vanilla joins available in DBIC?

-- 
   Eden Cardim       Need help with your Catalyst or DBIx::Class project?
  Code Monkey                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://blog.edencardim.com/            http://www.shadowcat.co.uk/servers/
http://twitter.com/#!/edenc



More information about the DBIx-Class mailing list