Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@brianherbert

Description

@brianherbert

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions