Doctrine: How to mark object column value as dirty?
I have a column of type [object][1] in a model. But if I load a model, and change a property of the object, and then re-save, it doesn't seem re-serialize the object. e.g.

    $model_instance = $table->find(1);
    $object = $model_instance->object_column;
    $object->someProp = 'new value';
    $model_instance->save(); //has no effect

 
I think this is because it is comparing the old and new values using `===`, which returns true because they are both references to the same object. 

I could clone the object before saving but there clearly must be a more obvious way which I have missed.

  [1]: http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/en#columns:data-types:object
Doctrine: How to mark object column value as dirty?
===

I have a column of type [object][1] in a model. But if I load a model, and change a property of the object, and then re-save, it doesn't seem re-serialize the object. e.g.

    $model_instance = $table->find(1);
    $object = $model_instance->object_column;
    $object->someProp = 'new value';
    $model_instance->save(); //has no effect

 
I think this is because it is comparing the old and new values using `===`, which returns true because they are both references to the same object. 

I could clone the object before saving but there clearly must be a more obvious way which I have missed.

  [1]: http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/en#columns:data-types:object