These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: hibernate template and session
PostPosted: Mon May 18, 2009 6:20 am 
Newbie

Joined: Wed Jul 23, 2008 2:50 am
Posts: 16
Hi i'm wondering about hibernatetemplate and session

if we look at those two example:
-------------------------------------------------
this is some example about session:
Query query = session.createQuery("select myrecord from " +
"com.shoesobjects.MyRecord");
getHibernateTemplate().find(
"from MyRecord where product_id=? ", productId);

------------------------------------
It is very easier and cleaner to work with hibernatetemplate, and i'm just wonder about what is advantages to use hibernatetemplate and why shouldn't use just session.(i know that hibernatetemplate use session internally.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.