Join Slack
Powered by
in a relation, can you reference another scalar id...
# orm-help
b
Boo
05/07/2022, 6:22 AM
in a relation, can you reference another scalar id on another table? or can it only be the
id
PK of the table. like on the table if you have
Copy code
postId BigInt @map("post_id") @@id([id, postId])
can i reference this
postId
on a relation?
n
Nurul
05/09/2022, 1:28 PM
You can refer to another scalar id but that should be unique, so you can add
@unique
to make the field unique.
Open in Slack
Previous
Next