Support for Polymorphic Associations
I have the following schema: ``` model Post { id String @default(cuid()) @id } model Comment { id String @default(cuid()) @id } model Vote { id String @default(cuid()) @id item Post | Comment } ``` I'd like to associate the `Vote` model so that a vote an be created for a `Post` or a `Comment`. As it stands now I have multiple models, `PostVote` and `CommentVote` which seems less than ideal.
Posted by piesrtasty on Feb 19, 2020, 3:03 AM
Tags
Related issues
- some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
- I think of this as the kiosk economy.
- What a goofy comment.
- There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
- Compose support in WSLc
- [RFC] Roadmap to v2.0
Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments
support (Other)
some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
I think of this as the kiosk economy.
What a goofy comment.
There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
Compose support in WSLc
[RFC] Roadmap to v2.0
[Feature]: Add TurboQuant Support for KV Cache Quantization
Support for AGENTS.md and .agents/skills/, the community has been asking since August 2025
Support for Polymorphic Associations
I have the following schema: ``` model Post { id String @default(cuid()) @id } model Comment { id String @default(cuid()) @id } model Vote { id String @default(cuid()) @id item Post | Comment } ``` I'd like to associate the `Vote` model so that a vote an be created for a `Post` or a `Comment`. As it stands now I have multiple models, `PostVote` and `CommentVote` which seems less than ideal.
Comments (0)
No comments yet. Start the discussion.