It's not possible. The "conditions" parameter is not for the middle table. Which I believe is enough. Otherwise, it should not be a relationship. It works for read by an incident, not by design.
entityDefs link conditions
Collapse
X
-
entityDefs link conditions
Hi there!
I have custom Event type entity with many to many link with User entity. Here its link definition
PHP Code:"attendees": {
"type": "hasMany",
"relationName": "cBusinessTripUser",
"foreign": "cBusinessTrips",
"entity": "User",
"audited": false,
"conditions": {
"user.defaultTeamId!=": "665080eda8f96c718"
},
"additionalColumns": {
"status": {
"type": "varchar",
"len": "36",
"default": "None"
}
},
"columnAttributeMap": {
"status": "acceptanceStatus"
}
}
P.S. I know that I can add extra field defaultTeamId to middle table, but it will be db normalization, and defaultTeamId sometimes changes, so I will end up with inconsistent data. If there a way to add join every time this table is selected, it would be great solution!Tags: None
Leave a comment: