You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot create an instance of a model when it has a compound primary key that is sourced from two abstract models. At runtime it fails to generate a valid select key for the create call, and then Prisma errors.
This isn't ideal, as I use the WithXYZ pattern extensively to declutter and DRY up common relations (e.g. a withAuthor abstract model with appropriate auth).
Confirmed there's an issue with recognizing id fields inherited from an abstract base. I'm making a fix and it'll be contained in the upcoming v1.11.0. Thank you for catching this!
Description
I cannot create an instance of a model when it has a compound primary key that is sourced from two abstract models. At runtime it fails to generate a valid
select
key for thecreate
call, and then Prisma errors.schema.zmodel
Script
Logs
Expected
It should be sending:
Ideas
Computed ID Fields
I think that the error comes from these lines, specifically when generating the IDs for each model.
These are the ID fields from here
Relation1
ConcreteModel
For some reason, there are no IDs here.
Environment
The text was updated successfully, but these errors were encountered: