[jOOQ/jOOQ#13639] Change the ManyToManyKeyDefinition name

The ManyToManyKeyDefinition is a directed synthetic key, going from table1 to table2 using foreignkey1 and foreignkey2.

In order to improve the code generation experience out of the box, the name of the key should be the one of foreignkey2.
This commit is contained in:
Lukas Eder 2023-05-01 11:04:45 +02:00
parent 47f59ce5d3
commit ce1835bdb2

View File

@ -53,7 +53,7 @@ public class DefaultManyToManyKeyDefinition extends AbstractConstraintDefinition
UniqueKeyDefinition uniqueKey,
ForeignKeyDefinition foreignKey2
) {
super(uniqueKey.getSchema(), uniqueKey.getTable(), uniqueKey.getName(), uniqueKey.enforced());
super(foreignKey2.getSchema(), foreignKey2.getTable(), foreignKey2.getName(), foreignKey2.enforced());
this.foreignKey1 = foreignKey1;
this.uniqueKey = uniqueKey;