HHH-15933 fix FK generated for ref to secondary table
This commit is contained in:
parent
1e57f88674
commit
9e9a363154
|
@ -107,8 +107,7 @@ public class ManyToOne extends ToOne {
|
|||
getForeignKeyDefinition(),
|
||||
new ArrayList<>( property.getColumns() )
|
||||
);
|
||||
//TODO: if the property belongs to a secondary table,
|
||||
// need to call foreignKey.setReferencedTable(table)
|
||||
foreignKey.setReferencedTable( property.getValue().getTable() );
|
||||
foreignKey.setOnDeleteAction( getOnDeleteAction() );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,11 @@ import org.hibernate.testing.TestForIssue;
|
|||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@Ignore
|
||||
@Disabled("test produces broken SQL and issue needs to be fixed")
|
||||
@TestForIssue(jiraKey = "HHH-15933")
|
||||
@SessionFactory
|
||||
@DomainModel(annotatedClasses = {Split.class, Reference.class})
|
||||
|
|
Loading…
Reference in New Issue