[jOOQ/jOOQ#16111] Generated implicit join alias collision when child table foreign keys share the same name

This commit is contained in:
Lukas Eder 2024-01-22 10:33:43 +01:00
parent 0db655820f
commit de1bf6e82d

View File

@ -558,7 +558,7 @@ public final class Internal {
public static final Name createPathAlias(Table<?> path, ForeignKey<?, ?> childPath, InverseForeignKey<?, ?> parentPath) {
Name name = childPath != null
? DSL.name(childPath.getName())
: DSL.name(parentPath.getName() + ".inverse");
: DSL.name(parentPath.getName() + ".inverse." + parentPath.getForeignKey().getTable().getName());
if (path instanceof TableImpl<?> t) {
if (t.path != null)