Fix query syntax for many relation through a pivot table.
This commit is contained in:
parent
5382371954
commit
cbca46020e
1 changed files with 2 additions and 2 deletions
|
@ -117,8 +117,8 @@ pub fn typedMany(
|
||||||
});
|
});
|
||||||
|
|
||||||
query.join(.{
|
query.join(.{
|
||||||
.sql = "INNER JOIN \"" ++ through.table ++ "\" ON AS \"" ++ prefix ++ "pivot" ++ "\" " ++
|
.sql = "INNER JOIN \"" ++ through.table ++ "\" AS \"" ++ prefix ++ "pivot" ++ "\" " ++
|
||||||
"\"" ++ toRepositoryConfig.table ++ "\"." ++ modelKey ++ " = " ++ "\"" ++ prefix ++ "pivot" ++ "\"." ++ through.joinModelKey,
|
"ON \"" ++ toRepositoryConfig.table ++ "\"." ++ modelKey ++ " = " ++ "\"" ++ prefix ++ "pivot" ++ "\"." ++ through.joinModelKey,
|
||||||
.params = &[0]_sql.RawQueryParameter{},
|
.params = &[0]_sql.RawQueryParameter{},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue