[Dbix-class] Feature request: complex join

Dmitry Belyavsky beldmit at gmail.com
Tue Jul 5 06:10:12 GMT 2011


Greetings!

On Tue, Jul 5, 2011 at 3:22 AM, Eden Cardim <edencardim at gmail.com> wrote:
>>>>>> "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.

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



More information about the DBIx-Class mailing list