[Dbix-class] update and join

Peter Rabbitson rabbit+dbic at rabbit.us
Thu Jan 22 09:25:38 GMT 2015


On 01/22/2015 09:18 AM, RAPPAZ Francois wrote:
> Hi Peter
>
> Thanks for the explanations: very clear
>
> I tried both
> $s->resultset('Ddref')->search_related('RefUser')->search({ 'RefUser.iduser' => 3 })->update({ 'id_credit' => 22 });
> $s->resultset('Ddref')->search_related_rs('RefUser',{ 'RefUser.iduser' => 3 })->update({id_credit => 22});
> 	
> Which silently failed. Id_credit in Ddusers is not changed. :-<
>

That is unsettling... Can you please do the following before the above:

  $s->storage->debug(1)

And tell me what queries were executed? Also - what version of 
DBIx::Class are you running?




More information about the DBIx-Class mailing list