You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/21 22:18:00 UTC
[jira] [Commented] (METAMODEL-1145) JDBC relation with composite
keys are incorrect
[ https://issues.apache.org/jira/browse/METAMODEL-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096935#comment-16096935 ]
ASF GitHub Bot commented on METAMODEL-1145:
-------------------------------------------
GitHub user tomatophantastico opened a pull request:
https://github.com/apache/metamodel/pull/149
Feature/jdbc composite relations
A fix for METAMODEL-1145.
The test might not be in the best location.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tomatophantastico/metamodel feature/jdbcCompositeRelations
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/metamodel/pull/149.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #149
----
commit c7f99b04ce2becd9ee7579e5f748c2c1d945e25d
Author: Jörg Unbehauen <jo...@unbehauen.net>
Date: 2017-07-17T13:19:46Z
Test case for composite PK/FK relations.
PK/FK relations are not correctly resolved, they are returned as a pairwise, cartesian product of their keys.
Test is in H2 database as SQL is used here, the problem should appear in all DBMS though.
commit 59fa48dbf8e0558b26f2f665b4cee8edd42c435a
Author: Jörg Unbehauen <jo...@unbehauen.net>
Date: 2017-07-17T13:21:45Z
and the fix, which is grouping the result set along the tables and pairwise listing of the columns
----
> JDBC relation with composite keys are incorrect
> -----------------------------------------------
>
> Key: METAMODEL-1145
> URL: https://issues.apache.org/jira/browse/METAMODEL-1145
> Project: Apache MetaModel
> Issue Type: Bug
> Affects Versions: 5.0.0
> Environment: JDBC
> Reporter: Joerg Unbehauen
> Fix For: 5.0.0
>
>
> Example
> A relational database with 2 tables using 3 keys for fk/pk relations, the getRelations() gives 3 relations with a single pk/fk pair, instead of a single relation with 3 pk/fk pairs.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)