Hi!

On 07/10/2008 02:05 PM Thomas Koch wrote:

> I just worked on a project in eZPublish, where I have to modify a
> PersistentObject on different places. If the object has been modified,
> it needs to be stored to the DB of course. But I do not know, whether
> further modification at other places will take places.

> So in the end it could happen, that a persistent object is stored
> multiple times to the DB in only one PHP call.

> So since you're working on the identity map to reduce multiple loading,
> I thought that it is the same issue with multiple storings.

> Maybe you could add the ability to postbone the storing to the end of
> the PHP request? 

What you desire is a Unit Of Work [1]. This is not trivial to be
implemented in a generic way, which is why we won't do it (soonish). You
can easily implement it in your custom application, since you know the
correct order for inserts and updates there.

Regards,
Toby

[1] http://martinfowler.com/eaaCatalog/unitOfWork.html
-- 
Mit freundlichen Grüßen / Med vennlig hilsen / With kind regards

Tobias Schlitt (GPG: 0xC462BC14) eZ Components Developer

[EMAIL PROTECTED] | eZ Systems AS | ez.no
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to