diff --git a/application/Espo/Resources/metadata/entityDefs/Role.json b/application/Espo/Resources/metadata/entityDefs/Role.json index e70c16f847..9160595002 100644 --- a/application/Espo/Resources/metadata/entityDefs/Role.json +++ b/application/Espo/Resources/metadata/entityDefs/Role.json @@ -17,7 +17,7 @@ "teams": { "type": "hasMany", "entity": "Team", - "relationName": "EntityTeam" + "foreign": "roles" } }, "collection": { diff --git a/application/Espo/Resources/metadata/entityDefs/Team.json b/application/Espo/Resources/metadata/entityDefs/Team.json index f3a4c248cc..341394f6cf 100644 --- a/application/Espo/Resources/metadata/entityDefs/Team.json +++ b/application/Espo/Resources/metadata/entityDefs/Team.json @@ -11,11 +11,13 @@ "links": { "users": { "type": "hasMany", - "entity": "User" + "entity": "User", + "foreign": "teams" }, "roles": { "type": "hasMany", - "entity": "Role" + "entity": "Role", + "foreign": "teams" } }, "collection": {