Correct subtle issue with code that was never used
This commit is contained in:
parent
1887f23ca5
commit
cc5ce81b8e
2 changed files with 3 additions and 1 deletions
|
@ -72,7 +72,7 @@ func buildRelationship(localTable Table, foreignKey ForeignKey, foreignTable Tab
|
|||
|
||||
col := foreignTable.GetColumn(foreignKey.Column)
|
||||
relationship := ToManyRelationship{
|
||||
Table: foreignKey.Table,
|
||||
Table: foreignKey.ForeignTable,
|
||||
Column: foreignKey.ForeignColumn,
|
||||
Nullable: col.Nullable,
|
||||
Unique: col.Unique,
|
||||
|
|
|
@ -101,6 +101,7 @@ func TestToManyRelationships(t *testing.T) {
|
|||
ToJoinTable: false,
|
||||
},
|
||||
{
|
||||
Table: "pilots",
|
||||
Column: "id",
|
||||
Nullable: false,
|
||||
Unique: false,
|
||||
|
@ -233,6 +234,7 @@ func TestToManyRelationshipsNull(t *testing.T) {
|
|||
ToJoinTable: false,
|
||||
},
|
||||
{
|
||||
Table: "pilots",
|
||||
Column: "id",
|
||||
Nullable: true,
|
||||
Unique: true,
|
||||
|
|
Loading…
Reference in a new issue