Each element of array is a foreign key
Hello, I'm trying to figure out how to create a postgres schema that will hold an array of ids property, and each element of that array is a foreign key. Is this possible with Drizzle?
Here's my implementation:
But I'm getting an error:
3 Replies
Having the same issue. Have you managed to find a solution to this?
I don’t believe Postgres supports this. You should create the foreign key from the user’s side, and then you can add a many relation in the reverse direction for the relational query builder
It's funny I just saw another person trying to do the same. This should be a many to many relation
Here: https://discord.com/channels/1043890932593987624/1151319079886520360