-
Jun 17th, 2009, 10:08 PM
#1
EntityManager versus getHibernateTemplate()?
Hi
Which one we should use, entity manager or hibernate template in spring?
from the design perspective which one is better.
Thanks
ved
-
Jun 18th, 2009, 01:30 AM
#2
You are comparing apples and oranges. You should either compare the SessionFactory and HibernateTemplate or EntityManager and JpaTemplate. I suggest you read this.
-
Jun 18th, 2009, 11:15 PM
#3
Thanks Marten for the reply.
I was my bad that i didnot explain the question properly. I went through the blog and must say it was very informative.
Basically i wanted to know, from the design and approach perspective, as to whether to use Hibernate session or the JPA entitymanager api's when you are starting a new project.
My take would be to use Entitymanager for the very simple and basic fact that one should always use and follow the specification api's (JPA) rather then using then using the implementation of the specs i.e Hibernate session.
Just wanted to know the views of experts out there.
Thanks
Ved
-
Jun 23rd, 2009, 02:55 PM
#4
There is no real design decision here (with JPA or hibernate 3.0.1 or higher) before that your code would be scattered with
a) Error handling code
b) transaction management code
The HibernateTemplate/JpaTemplate made that easier, however as the blog explained there is no need for that anymore...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules