Greetings! On Tue, Jul 5, 2011 at 3:22 AM, Eden Cardim <[email protected]> wrote: >>>>>> "Dmitry" == Dmitry Belyavsky <[email protected]> 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.
Thank you, it looks like what I want. > Also, why don't you just normalize your emails field into a table so you > can benefit from the vanilla joins available in DBIC? When I designed the database, I used arrays to make audit data easier. Now I've got an extra atributes so I had to make the emails table, but I still need the audit. -- SY, Dmitry Belyavsky _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[email protected]
