I am using JBOSS AS 7 and I have to use this command prior to querying:
entityManager.createNativeQuery(
"ALTER SESSION SET NLS_DATE_FORMAT =\"YYYY-MM-DD HH24:MI:SS\"");
Now if I fire up this query the error message "Not all named parameters have been set: [MI:SS]" is shown. That makes sense, and I understand named parameters and everything. But just in this case I want this whole string not fiddled with.
I also tried to set the "parameter" "MI" to MI and "SS" to SS, but that did not help either.
How can I fire this query up without Hibernate trying to replace the named parameters? Or how can I set this information globally in the application server resp. in the persistence.xml or the standalone.xml from JBOSS?