mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-02 03:38:03 +08:00
Fix the 'many to many' relationship (#369)
This commit is contained in:
parent
810896c94c
commit
8d17cc567e
@ -64,7 +64,8 @@ static std::map<std::string, std::vector<Relationship>> getRelationships(
|
||||
Relationship r(relationship);
|
||||
ret[r.originalTableName()].push_back(r);
|
||||
if (r.enableReverse() &&
|
||||
r.originalTableName() != r.targetTableName())
|
||||
(r.originalTableName() != r.targetTableName() ||
|
||||
r.originalTableAlias() != r.targetTableAlias()))
|
||||
{
|
||||
auto reverse = r.reverse();
|
||||
ret[reverse.originalTableName()].push_back(reverse);
|
||||
|
Loading…
Reference in New Issue
Block a user