You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Ken Geis (JIRA)" <ji...@apache.org> on 2018/09/06 19:45:00 UTC
[jira] [Commented] (METAMODEL-1196) relationships incorrectly
conflated
[ https://issues.apache.org/jira/browse/METAMODEL-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16606316#comment-16606316 ]
Ken Geis commented on METAMODEL-1196:
-------------------------------------
{{org.apache.metamodel.jdbc.JdbcMetadataLoader.loadRelations(ResultSet, Schema)}} collates all relationships by primary key table. The collation should be by {{FK_NAME}} (the foreign key name). In the case that {{FK_NAME}} is null, collation by PK table seems reasonable.
> relationships incorrectly conflated
> -----------------------------------
>
> Key: METAMODEL-1196
> URL: https://issues.apache.org/jira/browse/METAMODEL-1196
> Project: Apache MetaModel
> Issue Type: Bug
> Affects Versions: 5.1.0
> Reporter: Ken Geis
> Priority: Major
>
> (note: 5.1.0 is listed as an unreleased version even though it is released)
> I have the following tables:
> {noformat}
> a (
> b TEXT,
> c TEXT,
> FOREIGN KEY (b) REFERENCES d(e),
> FOREIGN KEY (c) REFERENCES d(e)
> )
> d (
> e TEXT PRIMARY KEY
> )
> {noformat}
> There are two different foreign key relationships, but MetaModel views them as one:
> {noformat}
> Relationship[primaryTable=d,primaryColumns=[e, e],foreignTable=a,foreignColumns=[b, c]]{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)