[hibernate-dev] Immutable entities read-only caching improvement proposal

2015-05-05 Thread Mihalcea Vlad
Hi guys, Taking this comment as a starting point http://vladmihalcea.com/2015/04/27/how-does-hibernate-read_only-cacheconcurrencystrategy-work/comment-page-1/#comment-3404 To reduce cache entities hydration, we could simply use the: "hibernate.cache.use_reference_entries" setting, but that's too

Re: [hibernate-dev] Immutable entities

2008-06-24 Thread Steve Ebersole
Mutable entities should be creatable as well as deletable. The difficulty with immutable and checking for changes (to see whether we should throw an exception) is that of performance in the case of simple reattachment of detached entities. This is less an issue in the case of merge()/saveOrUpda

Re: [hibernate-dev] Immutable entities

2008-06-23 Thread Steve Ebersole
What happens if you remove the unecessary save() call after changing the name? On Mon, 2008-06-23 at 09:08 +0200, Hardy Ferentschik wrote: > Hi there, > > I am trying to figure out what should happen if I modify an entity marked > as @Immutable. Somehow I expected an exception to be raised, bu

Re: [hibernate-dev] Immutable entities

2008-06-23 Thread Hardy Ferentschik
Hi, It seems changing an immutable entity does not throw an exception. Instead the update statements just gets ignored. However additions/removals to an immutable collection throws a HibernateException. Is this correct? I also changed my test code to do something like this: public

[hibernate-dev] Immutable entities

2008-06-23 Thread Hardy Ferentschik
Hi there, I am trying to figure out what should happen if I modify an entity marked as @Immutable. Somehow I expected an exception to be raised, but nothing seem to happen. I wrote this test case (the Country entity is marked as @Immutable): public void testImmutableEntity() throw