You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 30, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 30, 2021. It is now read-only.
When generating my Q sources for SQL queryDsl, my foreign keys contain duplicates.
For instance: public final com.querydsl.sql.ForeignKey lnk14051 = createForeignKey(Arrays.asList(cdRmrkDnr, cdRmrkDnr, cdRmrkDnr, cdRmrkDnr, cdRmrkDnr, cdRmrkDnr), Arrays.asList("DNR", "DNR", "DNR", "DNR", "DNR", "DNR"));
But it should jus tlook like: public final com.querydsl.sql.ForeignKey lnk14051 = createForeignKey(Arrays.asList(cdRmrkDnr), Arrays.asList("DNR"));
After a bit of deeper diving into the code, I was wondering if it has something to do with missing config parameters (maybe something to do with 'Catalog' ... to limit the amount of found foreignkeys in the metadata)
Could you maybe report this to the querydsl repository?
Also an example schema would help.
I think I can setup db2, so should not be an issue.
But yeah, finding where it goes wrong can be time consuming.
So ... The differentiator I notice is the PKTALBE_SCHEME ... so maybe it would be good to add this as a configuration property, to be able to limit the retrieved keys.
Activity
Shredder121 commentedon Sep 7, 2017
Could you maybe report this to the querydsl repository?
Also an example schema would help.
I think I can setup db2, so should not be an issue.
But yeah, finding where it goes wrong can be time consuming.
fireplace009 commentedon Sep 11, 2017
Hello,
"Report this to querydsl repo" ... I'm not sure what you want me to do here ...
I debugged a bit more and found that my DB2 returns the same foreignkey multiple times (in the KeyDataFactory)
Example:
` ------------ LNK14081 -------------------
#########>>>>>>>>>>>>> null // PKTABLE_CAT
#########>>>>>>>>>>>>> NK // PKTABLE_SCHEM
#########>>>>>>>>>>>>> TNK14040 // PKTABLE_NAME
#########>>>>>>>>>>>>> DNR // PKCOLUMN_NAME
#########>>>>>>>>>>>>> null // FKTABLE_CAT
#########>>>>>>>>>>>>> NK // FKTABLE_SCHEM
#########>>>>>>>>>>>>> TNK14080 // FKTABLE_NAME
#########>>>>>>>>>>>>> CUST_ORD_DNR // FKCOLUMN_NAME
#########>>>>>>>>>>>>> 1 // KEY_SEQ
#########>>>>>>>>>>>>> 3 // UPDATE_RULE
#########>>>>>>>>>>>>> 0 // DELETE_RULE
#########>>>>>>>>>>>>> LNK14081 // FK_NAME
#########>>>>>>>>>>>>> null // PK_NAME
#########>>>>>>>>>>>>> 7 // DEFERRABILITY
------------ LNK14081 -------------------
#########>>>>>>>>>>>>> null
#########>>>>>>>>>>>>> TNG0000
#########>>>>>>>>>>>>> CUST_ORD
#########>>>>>>>>>>>>> DNR
#########>>>>>>>>>>>>> null
#########>>>>>>>>>>>>> NK
#########>>>>>>>>>>>>> TNK14080
#########>>>>>>>>>>>>> CUST_ORD_DNR
#########>>>>>>>>>>>>> 1
#########>>>>>>>>>>>>> 3
#########>>>>>>>>>>>>> 0
#########>>>>>>>>>>>>> LNK14081
#########>>>>>>>>>>>>> null
#########>>>>>>>>>>>>> 7`
So ... The differentiator I notice is the PKTALBE_SCHEME ... so maybe it would be good to add this as a configuration property, to be able to limit the retrieved keys.
B;