openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daryl Stultz <da...@6degrees.com>
Subject Re: inverse OneToMany relation - getting weird
Date Fri, 13 Nov 2009 18:50:51 GMT
On Fri, Nov 13, 2009 at 1:09 PM, Michael Dick <michael.d.dick@gmail.com>wrote:

> The real issue is setting the backrefs. In JPA the application must
> maintain
> both sides of a bi-directional relationship (on your Java objects). There's
> some wording in the spec to this effect which I can drag up if you're
> interested.
>

I read parts of the manual regarding management of bidirectional
relationships and it struck some fear in my heart when considering enabling
L2 caching. I am currently not using L2 caching but expect to some day. It
sound as though things can get stale in the cache. If you have a parent
entity in the cache with all its children fetched and you take a child and
change its parent, later access to the parent will still have the child
related. Could that happen? This doesn't happen without L2 cache, of course,
but the docs suggest enabling L2 cache won't change the behavior.

-- 
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