Pre-insert callback?

From: Andrey Razumovsky (razumovsky.andre..mail.com)
Date: Fri Mar 06 2009 - 11:13:32 EST

  • Next message: Kevin Menard: "Re: Pre-insert callback?"

    Hi,

    currently we have prePersist and postPersist callbacks, which are fired for
    new objects. But the problem is that 'prePersist' callback is called only
    when context.newObject() is invoked and the data object has no properties.
    So, since 'preUpdate'is only invoked at modified objects, there's no
    callback *just before* commit. the only way for me to intercept new objects
    is in "validateForInsert", but this is certainly ugly. Or maybe I'm just
    missing something?
    I suggest that at the minimum we add a new callback ("preInsert").
     to keep API understandable I find it reasonable to deprecate postPersist
    and rename it to postInsert.

    Thanks,
    Andrey



    This archive was generated by hypermail 2.0.0 : Fri Mar 06 2009 - 11:14:04 EST