[Dbix-class] @bind confusion

Wolfgang Kinkeldei wolfgang at kinkeldei.de
Tue Aug 3 09:23:13 GMT 2010


Peter,

Am 03.08.2010 um 10:49 schrieb Peter Rabbitson:

> Wolfgang Kinkeldei wrote:
>> Hello,
>> when using subqueries in the 'from' part of a query, sometimes the list of @bind parameters is not maintained correct. As a simple testcase please find a primitive subselect enclosed that just does a count with a correlated subquery.
> 
> Were you helped with this problem already?

no, not yet. Your answer was the only one to this topic so far :-)

My current (hacky) solution is to avoid things that trigger bind parameters in subqueries when I find them failing. So far I did not have enough time to debug the internals of &DBIx::Class::SQLAHacks::_assemble_binds in order to suggest a solution or find the edge cases that make the bind parameter assembly fail.

The only thing I found when hooking some debugging info inside the method mentionned above: bind parameters used in a subquery are sometimes (but not always) repetitvely used in the "where" part for the subquery _AND_ in the "from" part of the main query.

[...]

Best,

Wolfgang Kinkeldei

-- 

' /\_/\ ' .print[split??,"".(($/=q|Cms)+-03467:;<=|)=~tr!C-z -B! -z!)x
'( o.o )' .$/]->[hex]foreach split qr<>,qq+1ecd039ad65b025b8063475b+||
' > ^ < ' .q<!-- Wolfgang Kinkeldei - mailto:wolfgang at kinkeldei.de -->





More information about the DBIx-Class mailing list