maybeNoT
Explore posts from serversPPrisma
•Created by maybeNoT on 6/18/2024 in #help-and-questions
Pointing two relations to same field?
I have a scenario where it make sense to store informations about two 1-n relation in one field.
I'm wondering if it is even possible to do something like this.
Consider this example:
This shows me an error of course:
But ideally I would like to have relation about
author1
and author2
stored separately on Post
table, and informations about these posts related to authors in one field with Post[]
.
In other words, I want to store informations about Post
related to the User
in one array, doesn't matter if a User
is in author1
or author2
field.
Is something like this possible?
- I'm using postgresql1 replies