Validation step?

From: Gentry, Michael (michael_gentr..anniemae.com)
Date: Tue Mar 30 2004 - 10:58:08 EST

  • Next message: Bret Gregory: "Persistance States and the reading of Properties"

    I think there needs to be an addition made to this part of the
    documentation (1.1M4):

    ============

     6.3.3 Committing All Modified DataObjects

    All of the objects with changes (what "changes" mean is discussed above)
    are committed to the database with a single method call on the
    DataContext:

        * public void commitChanges()

    Method commitChanges takes care of building correct SQL statements,
    generating primary keys and transactional behaviour. It roughly follows
    this scenario:

        * Checks if there are any changed objects.
        * Checks if there are any NEW objects.
        * Generates primary keys for any NEW objects that require
    autogenerated key.
        * Builds any needed SELECT, UPDATE, DELETE queries.
        * Starts the database transaction.
        * Runs the queries.
        * Commits transaction.
        * Changes all committed objects state to PersistenceState.COMMITTED.
        * Updates internally stored snapshots of the recently saved objects.

    ============

    When is the validation (validateFor*) done? My assumption would be step
    #2 and if an exception is thrown, don't continue.

    Thanks,

    /dev/mrg



    This archive was generated by hypermail 2.0.0 : Tue Mar 30 2004 - 10:58:18 EST