payload
payload copied to clipboard
Relationship with unique: true does not work in Postgres
Relationship with unique: true
does not work in Postgres. (Untested in mongodb)
beta.30
, db-postgres
to reproduce, create a collection which has a Field
of type relationship
, setting unique: true
and proceed to create multiple documents, linking to the same relation.
In the following repo, you can observe it in the posts
collection, where I attempt to make the Post.author
unique, but I am able to create as many Post
documents as I wish, with the same user being related to it.
https://github.com/HarleySalas/payload-3-reproductions/tree/unique-relationship