[jbosstools-issues] [JBoss JIRA] Resolved: (JBIDE-6351) org.hibernate.cfg.reveng.JDBCReader processTables() should support mixed-case names for TableTypes

Dmitry Geraskov (JIRA) jira-events at lists.jboss.org
Fri Sep 3 08:40:53 EDT 2010


     [ https://jira.jboss.org/browse/JBIDE-6351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Geraskov resolved JBIDE-6351.
------------------------------------

    Resolution: Done


> org.hibernate.cfg.reveng.JDBCReader processTables() should support mixed-case names for TableTypes
> --------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-6351
>                 URL: https://jira.jboss.org/browse/JBIDE-6351
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: Hibernate
>    Affects Versions: 3.1.0.GA
>            Reporter: Michael Walker
>            Assignee: Dmitry Geraskov
>            Priority: Blocker
>             Fix For: 3.2.0.Beta
>
>         Attachments: JBIDE-6351-patch-mpw.txt, JDBCReader.java
>
>
> A particular database (MetaMatrix/JBoss Enterprise Data Services Platform) returns mixed-case values from the JDBC call DatabaseMetadata.getTableTypes(), specifically: "Table", "View".
> However, line 539 of org.hibernate.cfg.reveng.JDBCReader expects these values to always be upper-case:
> if ( ("TABLE".equals(tableType) || "VIEW".equals(tableType) 
> ...
> Upper-case values are typically expected here (see http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#getTableTypes%28%29), but not required per the JDBC specification AFAIK.
> Changing this logic to match on case-insensitive names allows Hibernate Tools to successfully work with MetaMatrix. For example:
> if ( ("TABLE".equalsIgnoreCase(tableType) || "VIEW".equalsIgnoreCase(tableType) /*|| "SYNONYM".equals(tableType) */) ) { //||
> See the forum thread for more info.
> I'll attach example code that was used to rebuild hibernate-tools.jar successfully, which contains only the change described above, in case it is useful.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list