Closed joesonw closed 10 years ago
@joesonw what does your model look like? You should define the object
as an embed type.
Generally if a value is an object and not defined in the model it isn't saved. This is because objects are complex structures. Not only do they have values but they also have methods, etc. So if you don't define the schema then we don't know what to do with it.
Sorry obj
should be defined as embed type. See the tests for more detailed examples.
I have a object field which stores several different information depends on the instance. Is there a way to modify the object's data and then save it? Coz now it's not working as expected, like codes below.
$item->obj->value+=1; $item->save();
this does not work