-
1. Re: Entity caching?
adamw Sep 25, 2008 5:45 PM (in response to adepue)Hello,
well, you could say, that it's a feature, not a bug ;).
The infinite recursion won't ever happen - everything is lazy loaded. But you are right, in case of bi-directional associations the entities should be cached and "recycled". Please create a JIRA :)
Adam -
2. Re: Entity caching?
adepue Sep 25, 2008 7:27 PM (in response to adepue)Actually, the infinite recursion will happen if you use a property setter (instead of direct field), and that setter in any way accesses the entity passed in as a reference. This actually happened in my case. :) The setter accessing the entity causes the entity to lazy init, which causes the EntityRecords to load, which causes the entity to be set on them... well, you get the idea. :) This is actually a problem in our code at the moment though - it was inadvertent (via an interceptor), and this helped unearth the improper usage.
-
3. Re: Entity caching?
adamw Sep 26, 2008 11:22 AM (in response to adepue)Heh :) Ok, agreed then, it's a bug. So please create it in JIRA as a bug :)
--
Adam -
4. Re: Entity caching?
adepue Sep 26, 2008 1:42 PM (in response to adepue)I created https://jira.jboss.org/jira/browse/ENVERS-54 - I created it as a feature request. I'll let you change it to bug if you think it is warranted. :)
-
5. Re: Entity caching?
adamw Oct 1, 2008 6:29 AM (in response to adepue)Hello,
I've added a simple first-level cache (to trunk in SVN). It is VersionsReader-scoped.
Adam