Hi,
in a previous thread (
http://groups.google.com/group/persistencejs/t/
369858a7508dcab3) Zef mentioned that no events are triggered when a
new entity is added using persistence.add(). On the other hand, when I
remove an entity using persistence.remove(), a 'change' event is
triggered.
Since add events would be very helpful for me, I wrote a
persistence.objectAdded function very similar to the existing
persistence.objectRemoved. It seems to work like a charm, but I
started wondering why it wasn't part of persistence.js already, given
that it seems quite simple to implement.
So my question is: What is the reason for the current behavior? Are
there any pitfalls I'm not aware of when triggering events for
persistence.add?
Cheers,
Guido