[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1329) SchemaValidator fail when views are involved

Julien Kronegg (JIRA) noreply at atlassian.com
Tue Feb 24 08:28:40 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32489#action_32489 ] 

Julien Kronegg commented on HHH-1329:
-------------------------------------

Materialized views retrieval is not working using DB2, see http://opensource.atlassian.com/projects/hibernate/browse/HHH-3780

> SchemaValidator fail when views are involved
> --------------------------------------------
>
>                 Key: HHH-1329
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1329
>             Project: Hibernate Core
>          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 Plentz
>             Fix For: 3.2.6
>
>
> 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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list