using ERXGenericRecord willUpdate()

From: Michael DeMan (mdema..bermind.com)
Date: Wed Jul 02 2008 - 12:31:28 EDT

  • Next message: Mike Schrag: "Re: using ERXGenericRecord willUpdate()"

    I have a question on willUpdate() in ERXGenericRecord...

    We have a locking strategy that relies on a single INT column in the
    database that gets incremented every time there
    is an update on a given row.

    Currently, we are doing this within saveChanges(), walking through all
    the updated objects in the graph and incrementing the column/attribute.

    I would prefer to have this code all done in our main business object
    super class so code for this and other types of policy enforcement
    are handled all in one place. It appears that willUpdate() would be
    the hook I could use to do this

    Am I correct in presuming that it is okay to update a property, and/or
    manipulate relationships on objects getting ready to
    write themselves out to the database during willUpdate()?

    Thanks,

    - mike



    This archive was generated by hypermail 2.0.0 : Wed Jul 02 2008 - 12:32:17 EDT