setCallback() replaces previous callbacks making you have to repeat any
logic in the "base case' definition callback if you have a callback on
one of the groups. This commit adds an addCallback() method which can
be used to add a callback while still letting earlier callbacks be called
as well.
addCallback() will add the callback to a stack, and then all of the callbacks
will be called when creating the object. If any of the callbacks return false
the model won't be persisted a second time.
Calling setCallback() after addCallback() will clear the callback stack
before it sets the new callback. This will maintain backwards compatibility
with the previous behavior of setCallback().
setCallback() replaces previous callbacks making you have to repeat any logic in the "base case' definition callback if you have a callback on one of the groups. This commit adds an addCallback() method which can be used to add a callback while still letting earlier callbacks be called as well.
addCallback() will add the callback to a stack, and then all of the callbacks will be called when creating the object. If any of the callbacks return false the model won't be persisted a second time.
Calling setCallback() after addCallback() will clear the callback stack before it sets the new callback. This will maintain backwards compatibility with the previous behavior of setCallback().