Stop using MY_ORM::original(). It's got very odd semantics and we are

not capturing all cases for setting and resetting $original, which
leads to some weird and hard to reproduce behavior.

Instead, if we need the original just reload it from the database.
This may result in a somewhat excessive load in places, but we'll have
to fix that in a later optimization pass.
This commit is contained in:
Bharat Mediratta
2010-01-20 22:45:19 -08:00
parent 2a41e27d49
commit 995faaa27f
2 changed files with 54 additions and 51 deletions

View File

@@ -139,6 +139,7 @@ class Item_Model_Test extends Gallery_Unit_Test_Case {
try {
$item->name = $item2->name;
print "SAVE\n";
$item->save();
} catch (ORM_Validation_Exception $e) {
$this->assert_true(in_array("conflict", $e->validation->errors()));