Skip to content

How to improve complex relationship reads #1908

Answered by josephschorr
johnrc90 asked this question in Q&A
Discussion options

You must be logged in to vote

One way is a LookupSubjects via the tenant.

First, add the following to your tenant:

definition tenant {
  ...
  relation group: group
  permission member = group->member
}

Then write relationships linking the tenant to each group (i.e. inverted from your current group->tenant).

Then issue a LookupSubjects on tenant:whoever#member for user, and you should get back all the users for the tenant

Replies: 1 comment 3 replies

Comment options

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

@josephschorr
Comment options

@johnrc90
Comment options

Answer selected by josephschorr
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