]
Diego Pires Plentz updated HHH-1329:
------------------------------------
Assignee: Diego Pires Plentz
Issue Type: Bug (was: Improvement)
Summary: SchemaValidator fail when views are involved (was: SchemaValidator skips
views on Oracle)
SchemaValidator fail when views are involved
--------------------------------------------
Key: HHH-1329
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1329
Project: Hibernate3
Issue Type: Bug
Components: metamodel
Affects Versions: 3.1
Environment: database: oracle9i
hibernate: 3.1
jdbc driver: ojdbc14-10.2.0.1.0
Reporter: Yariv Yaari
Assignee: Diego Pires Plentz
All calls in org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata to
java.sql.DatabaseMetaData.getTables set the fourth parameter (types) to
{"TABLE"} (defined as a class-level constant).
In the documentation of getTables it is not defined what are the meanings of the types
passed as parameter, only that all the strings must be in
java.sql.DatabaseMetaData.getTablesTypes return value. In oracle9i with
ojdbc14-10.2.0.1.0.jar views are returned if types contains "VIEW" and not if
its {"TABLE"}. It is a major problem only if hibernate.hbm2ddl.auto is set to
validate, if it's set to update it will log some errors (since it can't create or
alter the table, there is a view with this name) but it won't fail the deployment, and
since in SQL views are treated as tables, there will be no more problems.
It should be checked for more databases/jdbc drivers.
It is not obvious what should be the solution.
Pass {"TABLE","VIEW"} always? Pass them if they are in
getTableTypes?
Put it as part of the dialect, default to {"TABLE"} and change it in
oreacle-dialects?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: