[Dbix-class] Scalar ref update()'s

Jose Fonseca zefonseca at gmail.com
Thu May 15 19:39:03 BST 2008


Hi,  pardon me if this is a known issue, I confess I have not researched
much.

Backend: MySQL 5.0

I have a magazine $subscription

The user renews, so I call

$subscription->end_date(   \'DATE_ADD(NOW(), INTERVAL 12 MONTH)'   );
$subscription->update();

It works a dandy, check the row and MySQL replies with a brand new 12 month.

But now, whenever I read

$end_date =3D $subscription->end_date();

I get a reference to \'DATE_ADD(NOW(), INTERVAL 3 MONTH)' and not the new
computed value. It seems we're missing a back and forth trip to the RDBMS?

This probably happens with any update using the scalar ref technique, have
not tested further though.

Or am I missing something?

Regards,
Jose Fonseca

-- =

http://zefonseca.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080515/89c=
6eff0/attachment.htm


More information about the DBIx-Class mailing list