[hibernate-issues] [Hibernate-JIRA] Commented: (HBX-1097) Reverse Engineering MaxDB / SapDB does not produce foreign keys

Laurence (JIRA) noreply at atlassian.com
Tue Nov 25 11:56:16 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31814#action_31814 ] 

Laurence commented on HBX-1097:
-------------------------------

I think the problem arises because in the JDBCReader tables are added to the DatabaseCollector with the catalogName forced to null when a zero length string is found. 

i.e. 
if (catalogName!=null && catalogName.trim().length()==0) {
    catalogName=null;
}

However when processForeignKeys looks up the foreign key tables it uses the getCatalogForModel() method which leaves a "" zero length string unchanged
i.e. fkCatalog = getCatalogForModel((String) exportedKeyRs.get("FKTABLE_CAT"))

As a result, all foreign key tables are filtered out because the reference is unknown. I think the same problem would apply if the schema were null.



> Reverse Engineering MaxDB / SapDB does not produce foreign keys
> ---------------------------------------------------------------
>
>                 Key: HBX-1097
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1097
>             Project: Hibernate Tools
>          Issue Type: Bug
>          Components: reverse-engineer
>         Environment: Hibernate 3, MaxDB 7.6
>            Reporter: Laurence
>         Attachments: SapDBMetaDataDialect.txt
>
>
> Foreign keys not produced when reverse engineering from MaxDB / SapDB

-- 
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