Reminder of the Propel Bug 734 - update() with limit() and a workaround
Just because we ran into this issue again. There is known and serious bug in propel whenever you use "update()" in combination with "limit()".
Our workaround right now is to replace the code.
//this will update all entry with the content "bar" in the column "foo"
MyQuery::create()
->filterByFoo('bar')
->limit(100)
->update(
array(
'Foo' => 'baz'
)
);
//this will only update 100 rows
$ids = (array) MyQuery::create()
->filterByFoo('bar')
->limit(100)
->select(
array(
'Id'
)
)
->find();
MyQuery::create()
->filterById($ids)
->update(
array(
'Foo' => 'baz'
)
);
Trackbacks
The author does not allow comments to this entry
Comments
Display comments as Linear | Threaded