Is there a Hibernate dialect for Oracle Database 11g? Or should I use the org.hibernate.dialect.Oracle10gDialect
that ships with Hibernate?
We had a problem with the (deprecated) dialect org.hibernate.dialect.Oracledialect
and Oracle 11g database using hibernate.hbm2ddl.auto = validate
mode.
With this dialect Hibernate was unable to found the sequences (because the implementation of the getQuerySequencesString()
method, that returns this query:
"select sequence_name from user_sequences;"
for which the execution returns an empty result from database).
Using the dialect org.hibernate.dialect.Oracle9iDialect
, or greater, solves the problem, due to a different implementation of getQuerySequencesString()
method:
"select sequence_name from all_sequences union select synonym_name from all_synonyms us, all_sequences asq where asq.sequence_name = us.table_name and asq.sequence_owner = us.table_owner;"
that returns all the sequences if executed, instead.