[Dbix-class] Scalar ref update()'s
Mark Trostler
mark at zzo.com
Thu May 15 20:18:44 BST 2008
$subscription->discard_changes right after the update...
Mark
Jose Fonseca wrote:
> 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 = $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/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.rawmode.org
More information about the DBIx-Class
mailing list