Ticket #395: Add post::loadFromIdentityMap() callback to fActiveRecord
| Reporter: | Marcus | Type: | enhancement | Opened: | 5 months ago | Status: | closed |
|---|---|---|---|---|---|---|---|
| Assigned to: | wbond | Priority: | major | Modified: | 5 months ago | Resolution: | fixed |
Right now this is pretty much the only place where returned record can't be modified. The solution I'm working on now depends on it's own properties that don't get transferred when the record is loaded from the identity map.
The whole object with all the extra properties is actually stored in the identity map, they just don't get copied over. With this callback I get a chance to copy over whatever other stuff I might need from the identity map.
The code for it is simply
fORM::callHookCallbacks( $this, 'post::loadFromIdentityMap()', $this->values, $this->old_values, $this->related_records, $this->cache, $object );
which is added to the end of loadFromIdentityMap(). I've tried it and it works great. Since loadFromResult() has a callback I'm really hoping loadFromIdentityMap() can get one too.
Attachments
History
03/14/10 23:43:52 changed by wbond
- status changed from new to closed.
- resolution set to fixed.

I added this in r770 and fixed the post::__construct() hook to always get called