[JIRA] Created: (CAY-959) Optimistic locking: Implement auto-version attributes

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Mon Jan 14 2008 - 06:04:33 EST

  • Next message: Andrus Adamchik: "Re: 3.0M3 Release Plan"

    Optimistic locking: Implement auto-version attributes
    -----------------------------------------------------

                     Key: CAY-959
                     URL: https://issues.apache.org/cayenne/browse/CAY-959
                 Project: Cayenne
              Issue Type: Task
              Components: Cayenne Core Library, Cayenne JPA
        Affects Versions: 3.0
                Reporter: Andrus Adamchik
                Assignee: Andrus Adamchik
                 Fix For: 3.0

    Per JPA spec , chapter 3.4, we need to support "Version" attribute for optimistic locking. Cayenne already supports optimistic locking, but leaves it up to the user to set the "version" columns. We need to implement auto-versioning on Cayenne end, and bridge it with Cayenne JPA provider.

    Cayenne API Tasks:

    1. Define ObjAttribute locking type to be LOCK_NONE, LOCK_VERSION, LOCK_MANUAL (make this an enum?)
    2. Replace ObjAttribute.usedForLocking property (with deprecation) with the new enum (call it "lockType" or something).
    3. Add modeler support for #2.
    4. Implement auto-versioning ... the easiest way is probably to use a PRE_PERSIST and PRE_UPDATE callback listener.

    JPA Tasks:

    5. Bridge JPA..ersion mapping with Cayenne mapping (see DataMapConverter).
    6. Write integration tests under "jpa-chapter3" module and/or jpa-chpater9 (where..ersion annotation is defined).

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Mon Jan 14 2008 - 06:04:57 EST