Wednesday 27 June 2012 9:18:37 am
Hi Wei,
The persistent data dirty member let you know if your fetched php object has been modified since it has been fetched. It turns to true everytime the value of an attribute is modified.
You could take a look at eZPersistentObject::sync() to understand better.
Regards,
Friday 29 June 2012 10:15:00 am
Yes. But the eZPersistentObject::sync() just has a few lines code which call eZPersistentObject::store() if the data marked only.
I see in the API doc, some attributes like "status" use sync(), other attributes and most the existing tutorials just use store().
When should use sync() and when should use store() then?
Friday 29 June 2012 10:20:22 am
Hi Wei,
sync() and store() have both the same effect ( as you can see that sync() call store() ).
sync() just check that your data have been altered before calling store(), i guess it's usefull to call it to avoid useless database transaction
regards,
You must be logged in to post messages in this topic!