Open fireplace009 opened 7 years ago
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.
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;
Hello,
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)
I'm using plugin:
`
`Any help would be highly appreciated :)