[teiid-issues] [JBoss JIRA] Commented: (TEIID-1359) DatabaseMetaData.getTables() not returning values when supplied with types.

John Doyle (JIRA) jira-events at lists.jboss.org
Mon Nov 15 16:48:43 EST 2010


    [ https://jira.jboss.org/browse/TEIID-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563481#comment-12563481 ] 

John Doyle commented on TEIID-1359:
-----------------------------------

Perhaps I've misdiagnosed it, but I've certainly got an issue.  I broke on the entry and exit of this method, noted the params, SQL generated in both cases and results.  In my specific case it only returns results in one case.  But perhaps it's something else.

I just modified what I assume is the test case TestMMDatabaseMetaData.testGetTables_specificTableMultipleTypes() to supply catalog and schema values and uppercased the table strings make a closer match to my case.  Works fine in the test.

I'll close this for now till I figure this out.



> DatabaseMetaData.getTables() not returning values when supplied with types.
> ---------------------------------------------------------------------------
>
>                 Key: TEIID-1359
>                 URL: https://jira.jboss.org/browse/TEIID-1359
>             Project: Teiid
>          Issue Type: Bug
>          Components: JDBC Driver
>    Affects Versions: 7.1.1
>         Environment: SOA 5.1 ER3 w/ EDS, JBDS Beta 1
>            Reporter: John Doyle
>            Assignee: Steven Hawkins
>
> I have a VDB deployed into EDS.  When I connect with a Hibernate config I don't get any tables back.  If I connect with the DTP tooling I do. The difference seems to be that Hibernate is passing "TABLE" and "VIEW" as table types, otherwise the params to the call are the same.
> Here is the SQL created in the call that returns no tables:
> SELECT VDBName AS TABLE_CAT, SchemaName AS TABLE_SCHEM, Name AS TABLE_NAME, CASE WHEN IsSystem = 'true' and UCASE(Type) = 'TABLE' THEN 'SYSTEM TABLE' ELSE UCASE(Type) END AS TABLE_TYPE, Description AS REMARKS, NULL AS TYPE_CAT, NULL AS TYPE_SCHEM, NULL AS TYPE_NAME, NULL AS SELF_REFERENCING_COL_NAME, NULL AS REF_GENERATION, IsPhysical AS ISPHYSICAL FROM SYS.Tables g  WHERE UCASE(VDBName) LIKE ? ESCAPE '\'  AND UCASE(SchemaName) LIKE ? ESCAPE '\'  AND UCASE(Name) LIKE ? ESCAPE '\'  AND (CASE WHEN IsSystem = 'true' and UCASE(Type) = 'TABLE' THEN 'SYSTEM TABLE' ELSE UCASE(Type) END LIKE ? ESCAPE '\'  OR CASE WHEN IsSystem = 'true' and UCASE(Type) = 'TABLE' THEN 'SYSTEM TABLE' ELSE UCASE(Type) END LIKE ? ESCAPE '\' ) ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME
> And the SQL from the call that returns the correct tables.
> SELECT VDBName AS TABLE_CAT, SchemaName AS TABLE_SCHEM, Name AS TABLE_NAME, CASE WHEN IsSystem = 'true' and UCASE(Type) = 'TABLE' THEN 'SYSTEM TABLE' ELSE UCASE(Type) END AS TABLE_TYPE, Description AS REMARKS, NULL AS TYPE_CAT, NULL AS TYPE_SCHEM, NULL AS TYPE_NAME, NULL AS SELF_REFERENCING_COL_NAME, NULL AS REF_GENERATION, IsPhysical AS ISPHYSICAL FROM SYS.Tables g  WHERE UCASE(VDBName) LIKE ? ESCAPE '\'  AND UCASE(SchemaName) LIKE ? ESCAPE '\'  AND UCASE(Name) LIKE ? ESCAPE '\'  ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the teiid-issues mailing list