Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Object Relational Mapping
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Object Relational Mapping
HibernateCallback
Andy Hahn
Ranch Hand
Posts: 225
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What's the difference between:
public void saveOrUpdate(final User user) { getHibernateTemplate().execute(new HibernateCallback(){ public Object doInHibernate(Session session) throws HibernateException, SQLException { session.saveOrUpdate(user); } }); }
and this:
this.getHibernateTemplate().saveOrUpdate(user);
Mark Spritzler
ranger
Posts: 17347
11
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Moving this to the ORM forum, where you will find the Hibernate questions and answers.
Thanks
btw. One is Hibernate is handling everything for you, the callback is that you handle it yourself, if you really want to go to that low level.
Mark
Perfect World Programming, LLC
-
iOS Apps
How to Ask Questions the Smart Way FAQ
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Checking Username exists?
Spring DAO + Hibernate; is this right?
Hibernate error
Problem with Parameters in Hibernate query
integration with hibernate
More...