[Dbix-class] update and join

Peter Rabbitson rabbit+dbic at rabbit.us
Thu Jan 22 10:01:58 GMT 2015


On 01/22/2015 10:38 AM, RAPPAZ Francois wrote:
> U:\docs\perl\dokpe_i02_dd>perl -M"DBIx::Class 9999"
> DBIx::Class version 9999 required--this is only version 0.08270.
>
>
>
> UPDATE ddusers SET id_credit = ? WHERE (  iduser IN ( SELECT * FROM ( SELECT Ref
> User.iduser FROM ddrefs me  JOIN ddusers RefUser ON RefUser.iduser = me.iduser W
> HERE ( RefUser.iduser = ? ) ) `_forced_double_subquery` )  ): '22', '3'
>
> For:
> $s->resultset('Ddref')->search_related_rs('RefUser',{ 'RefUser.iduser' => 3 })->update({id_credit => 22});

Are you saying that after the above command/SQL the ddusers table is 
*not* updated to id_credit=22 for the rows you want? How are you 
checking for this?




More information about the DBIx-Class mailing list