openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1545) Add new Detach processing
Date Mon, 05 Apr 2010 16:12:27 GMT


Rick Curtis commented on OPENJPA-1545:

> Can I merge() the object graph back when this detach lite was used with some entities
without a version field? 

> If yes, why did the test persistent entities that worked before this change without version
field required addition of a version field? 
I'm guessing that adding the @Version field is a good(/bad) habit that I've got myself into.
I did some testing and I can remove the @Version field, but I would need to change one assertion
in the new testcase. When there is no version field and no detached state field, the Entity
doesn't know whether is is detached or not(PersistenceCapable.pcIsDetached()). The OpenJPA
runtime is able to determine whether or not the Entity exists by hitting to the db looking
for the Entities id. see BrokerImpl.isDetached(Object o);

> Add new Detach processing
> -------------------------
>                 Key: OPENJPA-1545
>                 URL:
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: performance
>    Affects Versions: 2.0.0-beta2
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.0.0
>         Attachments: OPENJPA-1545.patch
> There have been a number of mailing list posts where the net of the post is that someone
doesn't want OpenJPA to detach their Entities because after the commit happens, then are all
going to be gc'd. All of the detach processing ends up being a waste.  I also observed this
same behavior when running some performance tests.
> With this JIRA I'm going to add a new openjpa.DetachState configuration option which
will enable a new, super fast, minimalistic detach approach. This change is targeted at detach
processing that happens due to an AutoDetach. Explicit detaches(ie: em.detach(..) ) will work
as they always have before.

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

View raw message