Skip to content

API rule join syntax for "sharing" records with other users? #4476

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

You must be logged in to vote

I'd rather avoid a list of relations, since I think that's an anti-pattern here?

It depends on the desired data flow. The main cons of having a multiple relation field directly in the Story collection is that anyone who can modify the story will be able to add/remove relations (unless restricted programmatically with Go/JS or some complex API rule). For example, this is usually useful when you want to assign multiple tags, categories, labels, etc.

For your particular example using a separate collection is may be the better approach, although I'm not sure that I fully understand the desired behavior (ex. is the book_owner field needed?).

If you use PocketBase v0.22.0, here is a slightly …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@j6k4m8
Comment options

@j6k4m8
Comment options

@ganigeorgiev
Comment options

@j6k4m8
Comment options

Answer selected by j6k4m8
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
Converted from issue

This discussion was converted from issue #4475 on March 02, 2024 15:17.