Hi!

Tobias Schlitt wrot
> Refetching objects
> ==================
> 
> Problem
> -------
> 
> It might be desirable to re-fetch a set of objects during a request. A
> global switch in the ezcPersistentIdentityMap instance will allow this
> to happen. If this switch is turned on, ezcPersistentIdentitySession
> should fetch the values of the affected objects from the database again
> and cache them.
> 
> Solution
> --------
> 
> The $refetch option will be moved from ezcPersistentIdentityMap to
> ezcPersistentIdentitySession. If it is turned on, the session will not
> ask the identity map for an identity, but directly issue the query. The
> results of this query will be "replaced" into the identity map, using a
> new replaceObject() method. This method will check, if an identity of
> the object already exists. Is this the case, it will replace the values
> in the existing identity with the values of the submitted object and
> return the existing identity. If no identity exists, the submitted
> identity will be recorded and returned. The session will always replace
> the fetched object with the one returned from replaceObject().

Is it ok to couple the persistent session with the identity map?
I don't mind because i will use it anyway. I agree that it should not be
optionnal.
Will replaceObject() be used when updating an object? I think it should.

Regards, James.
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to