This content has been marked as final.
Show 4 replies
-
1. Re: How can we use oracle hints in EJB (3.0)?
maxandersen Apr 20, 2007 10:50 AM (in response to hudowski)Does openjpa claim to support it ?
Since EJBQL != SQL you would need to mutate the generated sql. In hibernate you can do that by:
implement Interceptor.onPrepareStatement(String sql)
or
write native queries directly instead (use @NamedSQLQuery and/or <sql-query>) -
2. Re: How can we use oracle hints in EJB (3.0)?
fhh Apr 20, 2007 11:01 AM (in response to hudowski)The JPA hint feature is for adding hints for the entityManager not the database. As far as I know you can only use SQL hints if you use native queries.
Regards
Felix -
3. Re: How can we use oracle hints in EJB (3.0)?
hudowski Apr 20, 2007 11:13 AM (in response to hudowski)I've found my example on
http://edocs.bea.com/kodo/docs41/full/html/dbsupport_oracle.html
Rafal -
4. Re: How can we use oracle hints in EJB (3.0)?
maxandersen Apr 20, 2007 11:53 AM (in response to hudowski)ah ok they have a very oracle specfic select hint.
we could/should add that at some point too.
btw. by using query.setComment you can put in hints that will work in the start of your sql.