PermIds and the new ContextCommit

From: Craig Miskell (cmiskel..lbatross.co.nz)
Date: Tue Mar 11 2003 - 16:23:08 EST

  • Next message: Andrus Adamchik: "Re: PermIds and the new ContextCommit"

    Hi all,
            I just (finally) updated my work copy of Cayenne to the latest from
    CVS, with the new ContextCommit changes (I was interested to see if it
    was any faster... our unittests appear to run a smidgen faster, but that
    is probably just statistical noise :-)).

    Now, DataContext has createPermId(), which a couple of months back I
    modified to handle the case of a TempObjectId already having a permID
    (basically we are doing auditing and need to manually create a permanent
    id before calling commit, which we do by calling createPermId).

    This didn't work after update, because
    PrimaryKeyGenerationSupport.createPermIdsForObjEntity() didn't do this
    check. Easily fixed, I have done so and will commit shortly. However,
    it raises the question of whether createPermId is still a valid method
    to have in DataContext? The code is nearly identical (the PKGSupport
    method appears slightly more complex... probably good reason :-)), and
    createPermId is only used by a couple of tests.

    Should createPermId be deprecated and implemented in terms of
    PKGSupport.createPermIdsForObjEntity() ?

    Craig



    This archive was generated by hypermail 2.0.0 : Tue Mar 11 2003 - 16:23:54 EST