[Dbix-class] PATCH: Support for arbitrary SQL in relationship definition

Peter Rabbitson rabbit+dbic at rabbit.us
Tue Jun 30 06:58:09 GMT 2009


David Ihnen wrote:
> Ivan Fomichev wrote:
>> Hello, great module. Instead of arguing if it is a useful patch or not
>> and if it should be applied or there are weird workarounds easily
>> available, just make your own DBIx::Class component and release it on
>> CPAN. Who need will load this component. Good luck. Ivan.
>>   
> Can you even DO that in a component?
> 
> Essentially you're suggesting writing your own DBIx::Class::Relationship?
> 
> The thought makes my eyes water.
> 

And you on the other hand are suggesting that we include *some* support,
no matter how well thought through (or not). I stand by my criticism, that
the only sql-in-scalarref we could responsibly publicize is the virtual
view construct, which is built for this very purpose. Problem of course is
that the view definitions (virtual or not) are static, i.e. we can't push
placeholders into the join condition.

So really this discussion is coming down to: "A call for relationship
attribute proposals to specify query-time join conditions, harnessing the
full power of SQLA"

Cheers



More information about the DBIx-Class mailing list