RE: [hibernate-dev] FlushMode.NEVER deprecated
by Steve Ebersole
Thanks for highlighting exactly why FlushMode.NEVER was poorly named ;)
I believe you are actually asking for FlushMode.NEVER to actually be migrated to a new semantic. That's not a good idea because it would be confusing for users on an upgrade...
-----Original Message-----
From: hibernate-dev-bounces(a)lists.jboss.org [mailto:hibernate-dev-bounces@lists.jboss.org] On Behalf Of andresgr
Sent: Monday, December 04, 2006 9:36 AM
To: hibernate-dev(a)lists.jboss.org
Subject: [hibernate-dev] FlushMode.NEVER deprecated
Hi.
I can see in Hibernate 3.2 LockMode.NEVER is deprecated in favor of
LockMode.MANUAL.
Maybe this is a silly argument... but i think that FlushMode.NEVER has
some "semantic" benefits. I mean, if i'm reading code and see
session.setFlushMode(FlushMode.NEVER)
i think "oh, this is going to be a read-only session". On the other
hand, if i see
session.setFlushMode(FlushMode.MANUAL)
i'll think "oh, in this session the developer is going to manually
flush the session at some point, instead of letting hibernate taking
care".
Even more, hibernate could throw some "Not flushable session
(read-only)" exception if someone try to flush on this mode...
--
-=-=-=-=-=-=-=-=-=-=-=-=-
Andrés González.
http://coyotevil.blogspot.com
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
17 years, 11 months
FlushMode.NEVER deprecated
by andresgr
Hi.
I can see in Hibernate 3.2 LockMode.NEVER is deprecated in favor of
LockMode.MANUAL.
Maybe this is a silly argument... but i think that FlushMode.NEVER has
some "semantic" benefits. I mean, if i'm reading code and see
session.setFlushMode(FlushMode.NEVER)
i think "oh, this is going to be a read-only session". On the other
hand, if i see
session.setFlushMode(FlushMode.MANUAL)
i'll think "oh, in this session the developer is going to manually
flush the session at some point, instead of letting hibernate taking
care".
Even more, hibernate could throw some "Not flushable session
(read-only)" exception if someone try to flush on this mode...
--
-=-=-=-=-=-=-=-=-=-=-=-=-
Andrés González.
http://coyotevil.blogspot.com
17 years, 11 months