Skip to content

Backrelation but use field from other relation as relField #4969

Closed Answered by ganigeorgiev
ValentinKolb asked this question in Q&A
Discussion options

You must be logged in to vote

Am I right that in the statement referenceCollection_via_relField.column the column comes from the referenceCollection?

Yes. referenceCollection_via_relField represents records from referenceCollection. The _via_relField specifies what field to use to perform the "join".

When writing API rules, the autocomplete sometimes also suggests someCollection.referenceCollection_via_relField.someField but what does this syntax do?

See the previous answer.

Now, I want an API rule for the User collection, so that all users in the admin group of the company of the user can VIEW/UPDATE/... the user (that is from the same company).

I'm a bit confused and don't understand the need of both groups->c…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ValentinKolb
Comment options

@ganigeorgiev
Comment options

@ValentinKolb
Comment options

Answer selected by ValentinKolb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants