Hi Marc,
I'm not sure if you are attempting to identify a bug in 1.2.x or 2.2.x...
There were several inconsistencies as we moved from the JPA 1.0
specification to the JPA 2.0 specification.  These are documented here
[1].  None of these items seem directly related to your situation, but
maybe you'll see something that catches your eye.

I'm also confused on your hesitancy with opening a PMR...  If a problem
does exist with the version of OpenJPA that ships with WebSphere, you would
want/need a PMR in order to get a fix for the WebSphere release.

Speaking of fixes...  As you can expect, besides the new JPA 2.0 features,
there are several fixes that have been integrated into the code stream
since OpenJPA 1.2.0 went out the door.  So, there may have been some fixes
that directly or indirectly helped your situation, but since nobody has
reported the issue on the older version, it hasn't been back-ported yet.  A
WebSphere PMR would help identify these type of changes.  Or, you could
query the OpenJPA JIRAs [2] for a hit.

Sorry that I don't have a concrete answer to your query.  Maybe some of the
documentation links that I provided will help shed some light.  If not, you
can re-post with more information specific to your scenario (your original
code posting didn't come through).

Thanks,
Kevin

[1]
http://people.apache.org/~mikedd/nightly.builds/apache-openjpa-2.3.0-SNAPSHOT/docs/docbook/manual.html#migration_considerations
[2]  https://issues.apache.org/jira/browse/OPENJPA

On Mon, Feb 4, 2013 at 8:00 AM, mwalter <marc.wal...@sbb.ch> wrote:

> The version incrementation strategy to prevent concurrent write operations
> behaves differently on OpenJPA 1.2.3 and the newest version 2.2.1. Maybe
> this is a bug in OpenJPA 1.2.3 but we are not sure.
>
> We created a test project where we can reproduce the difference between the
> two OpenJPA versions. The difference shows up when list operations are
> executed on a list of children in a one-to-many parent-child relation. If
> the parent or a child entity is modified only the parent or child version
> is
> incremented. That's okay. If a child is added to or removed from the list
> the version fields of ALL children are incremented using OpenJPA 1.2.3
> whereas the parents' version is incremented only using OpenJPA 2.2.1.
> Because we use entity callback methods to set usernames and timestamps all
> modified user and modified timestamps of all children are updated even
> though a user just added a child to the relation. That shouldn't happen
> because in our case it has legal consequences unfortunately.
>
> There is another odd thing. The mentioned behavior appears only if the
> parent entity is merged.
>
> If the child entity is merged version incrementation behaves like OpenJPA
> 2.2.1.
>
> Here're our parent and child entities and the entity superclass containing
> the version field:
>
>
>
> We're using OpenJPA 1.2.3-SNAPSHOT which comes with WebSphere 7.0. Entities
> are detached, then modified and sent back to the server again where they
> are
> merged (we use RCP clients).
>
> So please can someone of the OpenJPA team confirm the behavior and issue a
> statement that it is not a bug? Otherwise we have to open an APAR at IBM
> support as long as we use WebSphere 7.0 production platform. Migrating to
> WebSphere 8.5 (OpenJPA 2.2.1) would solve our issue anyway. Thank you!
>
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Different-version-incrementation-behavior-or-bug-tp7582703.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>

Reply via email to