I'm using Oracle8 and most of my tables are under the schema "A", but one table can only be accessed without schema prefix. In my mapping I'm using the "hibernate.default_schema" property so I don't have to define the schema everywhere. My problem is that with "hibernate.default_schema" I cannot say to Hibernate not to use schemas.
To ilustrate the problem:
Most of my tables are on schema "A", the following query works:
select * from A.table0
But one of my tables "tableN" cannot be accessed using schema prefixes:
select * from tableN
No schema prefix will make the select work.
I've tryed to make the mapping of "tableN" not use schemas on the generated SQL, but found no luck. I've tried using schema tags in the class and hibernate-mapping tags:
<hibernate-mapping package="xxxx" schema="">
<class name="Yyyy" table="tableNl">
<hibernate-mapping package="xxxx" >
<class name="Yyyy" table="tableNl" schema="">
Hibernate throws "java.lang.StringIndexOutOfBoundsException: String index out of range: 0" since it checks for quoting.
Looking at the code seens like Hibernate will allways generate a schema if the default schema is not null.
Do you have some pointers of how I fix this, but without resorting to have to define my schema in every mapping file.