This content has been marked as final.
Show 4 replies
-
1. Re: using JPA vs. Hibernate with SEAM apps
nickarls Jan 21, 2008 2:29 PM (in response to asookazian)Personally I use the "standards first"-approach. You can probably cover 90+% of your needs with JPA and for the rest you can easily fall back on Hibernate-extended annotations or the Hibernate session.
-
2. Re: using JPA vs. Hibernate with SEAM apps
norman.richards Jan 21, 2008 3:29 PM (in response to asookazian)Even when using JPA, it is still possible to reach down to get Hibernate if you need something from it. (assuming Hibernate is your persistence provider, that is) I think I'd always start with the JPA interfaces.
-
3. Re: using JPA vs. Hibernate with SEAM apps
asookazian Jan 21, 2008 4:19 PM (in response to asookazian)"norman.richards@jboss.com" wrote:
Even when using JPA, it is still possible to reach down to get Hibernate if you need something from it. (assuming Hibernate is your persistence provider, that is) I think I'd always start with the JPA interfaces.
what do you mean by "reach down to get Hibernate" exactly? Are you talking about using the javax.persistence.Session interface directly as required in a class and importing the appropriate package/interface?
so in other words, use JPA (e.g. EntityManager) most of the time unless you need a method that JPA api does not provide but Hibernate API does? -
4. Re: using JPA vs. Hibernate with SEAM apps
nickarls Jan 21, 2008 4:34 PM (in response to asookazian)the EntityManager has a getDelegate() method that returns an Object that can be cast to the underlying providers (e.g. Hibernate) Session or similar