[jOOQ/jOOQ#9597] Fix bug in DefaultRelations#getCheckConstraints()
All check constraints ended up being owned by the same table.
This commit is contained in:
parent
9c1ea8ab22
commit
c5a35289fa
@ -323,15 +323,15 @@ public class DefaultRelations implements Relations {
|
||||
if (checkConstraintsByTable == null) {
|
||||
checkConstraintsByTable = new LinkedHashMap<>();
|
||||
|
||||
for (CheckConstraintDefinition constraint : checkConstraints.values()) {
|
||||
List<CheckConstraintDefinition> list = checkConstraintsByTable.get(table);
|
||||
for (Map.Entry<Key, CheckConstraintDefinition> entry : checkConstraints.entrySet()) {
|
||||
List<CheckConstraintDefinition> list = checkConstraintsByTable.get(entry.getKey().table);
|
||||
|
||||
if (list == null) {
|
||||
list = new ArrayList<>();
|
||||
checkConstraintsByTable.put(table, list);
|
||||
checkConstraintsByTable.put(entry.getKey().table, list);
|
||||
}
|
||||
|
||||
list.add(constraint);
|
||||
list.add(entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user