Refine the relationship to_one texts.
- This is so we can completely replace the data set being used (combination of tplData, and texts) by texts data.
This commit is contained in:
parent
e08eacad05
commit
f4ce95891c
2 changed files with 26 additions and 7 deletions
|
@ -75,15 +75,21 @@ func TestTextsFromForeignKey(t *testing.T) {
|
|||
}
|
||||
|
||||
videos := bdb.GetTable(tables, "videos")
|
||||
texts := textsFromForeignKey(tables, videos, videos.FKeys[0])
|
||||
texts := textsFromForeignKey("models", tables, videos, videos.FKeys[0])
|
||||
expect := RelationshipToOneTexts{}
|
||||
|
||||
expect.LocalTable.NameGo = "Video"
|
||||
expect.LocalTable.ColumnNameGo = "User"
|
||||
expect.ForeignKey = videos.FKeys[0]
|
||||
|
||||
expect.LocalTable.NameGo = "Video"
|
||||
expect.LocalTable.ColumnNameGo = "UserID"
|
||||
|
||||
expect.ForeignTable.Name = "users"
|
||||
expect.ForeignTable.NameGo = "User"
|
||||
expect.ForeignTable.ColumnName = "id"
|
||||
expect.ForeignTable.ColumnNameGo = "ID"
|
||||
|
||||
expect.Function.PackageName = "models"
|
||||
expect.Function.Name = "User"
|
||||
expect.Function.Varname = "user"
|
||||
expect.Function.Receiver = "v"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue