This content has been marked as final.
Show 5 replies
-
1. Re: Criteria or on the fly sql
manica Feb 27, 2006 11:37 PM (in response to armita)You can access the Criteria API within EJB3 as follows (where manager is your EntityManager):
HibernateSession hs = (HibernateSession)manager;
Session session = hs.getHibernateSession();
Criteria criteria = session.createCriteria(Foo.class);
...
Darin -
2. Re: Criteria or on the fly sql
armita Feb 28, 2006 3:32 AM (in response to armita)Is it JBoss specific?
-
3. Re: Criteria or on the fly sql
maxandersen Feb 28, 2006 3:34 AM (in response to armita)yes, ejb3 does not have a criteria equivalent functionallity.
-
4. Re: Criteria or on the fly sql
maxandersen Feb 28, 2006 3:35 AM (in response to armita)correction if JBoss refers to the JBoss server and not just our name.
fyi it is not dependent on a JBoss server just dependent on Hibernate Entitymanager which can be used independently -
5. Re: Criteria or on the fly sql
armita Mar 1, 2006 7:51 AM (in response to armita)I see, I found this a very very helpful functionality, it is a pitty EJB3 could not create on the fly querys. So still hibernate is better than EJB!!