A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Doubt Regarding Transaction and flush
Joined: Oct 14, 2010
Mar 31, 2012 00:05:41
I am novice in hibernate. i am having a doubt regarding transactions and flushing..
whenever we want to persist an object we open a session and begin a transaction. after persisting which one of these comes first and the other follows ......
According to what i have read commit() commits values to the database.
flush() syncs objects state to the database.
what is the difference between these two.....
Thanks & Regards,
Joined: Mar 24, 2008
Apr 01, 2012 01:41:43
It is called during a commit as well, but there can be other scenarios where
is required as described
SCJP 5 | SCWCD 5
How to ask questions
I agree. Here's the link:
subject: Doubt Regarding Transaction and flush
Entity Manager flush() doubt
Doubt in Session beans
CMP Transactions Doubt
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014