Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using set_expr alone it doesn't trigger query creation #90

Closed
brianherbert opened this issue Jan 3, 2013 · 2 comments
Closed

When using set_expr alone it doesn't trigger query creation #90

brianherbert opened this issue Jan 3, 2013 · 2 comments
Assignees
Milestone

Comments

@brianherbert
Copy link
Contributor

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.

@treffynnon
Copy link
Collaborator

Thanks for the issue report. Fixed in commit 3439ca1

@brianherbert
Copy link
Contributor Author

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)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants