j4mie/idiorm

When using set_expr alone it doesn't trigger query creation

brianherbert opened this issue · 2 comments

Example:

$person = ORM::for_table('person')->find_one(5);
$person->set_expr('updated', 'NOW()');
$person->save();

This code will not execute a query. My guess is the filtering of fields by set_expr ones and regular clean fields makes Idiorm think there isn't anything to do.

However, when you do:

$person = ORM::for_table('person')->find_one(5);
$person->name = 'Bob;
$person->set_expr('updated', 'NOW()');
$person->save();

It will work.

Thanks for the issue report. Fixed in commit 3439ca1

Thanks for the super fast turnaround!

On Friday, January 4, 2013 at 0:32, Simon Holywell wrote:

Thanks for the issue report. Fixed in commit 3439ca1 (3439ca1)


Reply to this email directly or view it on GitHub (#90 (comment)).