openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
Subject Re: State Management, changed properties on detached object not saving
Date Tue, 07 Jul 2009 20:45:07 GMT
On Wed, Jul 1, 2009 at 3:06 PM, Daryl Stultz <daryl@6degrees.com> wrote:

> On Wed, Jul 1, 2009 at 3:58 PM, Daryl Stultz <daryl@6degrees.com> wrote:
>
> > Is there a way to detach a single entity instance without closing the em?
> >
>
> I see I can cast my em to OpenJPAEntityManager. Should I use detachCopy,
> evict, or detach (which is in the code but not the JavaDocs)? Documentation
> is a little thin.
>

I'd use detach. DetachCopy IIRC detaches a new copy of the entity, but
leaves the original entity in the PersistenceContext. Evict I'm not sure
about, I opened JIRA OPENJPA-1162 [1] on your behalf to add better javadoc.

https://issues.apache.org/jira/browse/OPENJPA-1162


>
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:daryl@6degrees.com
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message