You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Ari Maniatis (JIRA)" <ji...@apache.org> on 2010/01/06 10:47:54 UTC

[jira] Updated: (CAY-959) Optimistic locking: Implement auto-version attributes

     [ https://issues.apache.org/jira/browse/CAY-959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ari Maniatis updated CAY-959:
-----------------------------

    Component/s:     (was: Cayenne JPA)

I'm removing the JPA component, but this task looks like it still might be useful. Andrus do you want to keep it?

> Optimistic locking: Implement auto-version attributes
> -----------------------------------------------------
>
>                 Key: CAY-959
>                 URL: https://issues.apache.org/jira/browse/CAY-959
>             Project: Cayenne
>          Issue Type: Task
>          Components: Cayenne Core Library
>    Affects Versions: 3.0
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>             Fix For: Short term future
>
>
> 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 @Version mapping with Cayenne mapping (see DataMapConverter).
> 6. Write integration tests under "jpa-chapter3" module and/or jpa-chpater9 (where @Version annotation is defined).

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