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);
|
Relationship r(relationship);
|
||||||
ret[r.originalTableName()].push_back(r);
|
ret[r.originalTableName()].push_back(r);
|
||||||
if (r.enableReverse() &&
|
if (r.enableReverse() &&
|
||||||
r.originalTableName() != r.targetTableName())
|
(r.originalTableName() != r.targetTableName() ||
|
||||||
|
r.originalTableAlias() != r.targetTableAlias()))
|
||||||
{
|
{
|
||||||
auto reverse = r.reverse();
|
auto reverse = r.reverse();
|
||||||
ret[reverse.originalTableName()].push_back(reverse);
|
ret[reverse.originalTableName()].push_back(reverse);
|
||||||
|
|
Loading…
Reference in New Issue