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
Description and expected behavior
I have a model which uses inheritance. When creating a query with the enhanced client, I can use all the fields from the base model and the derived model in my where clause. However, only the field from the derived model work.
Environment
ZenStack version: 2.0.1
Prisma version: 5.13.0
Database type: Postgresql
Code
// This is your Prisma schema file,// learn more about it in the docs: https://pris.ly/d/prisma-schemageneratorclient{provider="prisma-client-js"}datasourcedb{provider="postgresql"url=env("DATABASE_URL")}enumDrinkType{DrinkBeerWineSodaCocktail}enumContainerType{BeerBottleWineBottlePlasticBottleCanCarton}modelDrink{idInt @id @default(autoincrement())slugString @uniquemanufacturer_idIntmanufacturerManufacturer @relation(fields: [manufacturer_id],references: [id])typeDrinkTypenameString @uniquedescriptionStringabvFloatimageString?
glutenBooleanlactoseBooleanorganicBooleancontainersContainer[]
@@delegate(type)
@@allow('all',true)}modelBeerextendsDrink{style_idIntstyleBeerStyle @relation(fields: [style_id],references: [id])ibuFloat?
@@allow('all',true)}modelBeerStyle{idInt @id @default(autoincrement())nameString @uniquecolorStringbeersBeer[]
@@allow('all',true)}modelWineextendsDrink{style_idIntstyleWineStyle @relation(fields: [style_id],references: [id])heavy_scoreInt?
tannine_scoreInt?
dry_scoreInt?
fresh_scoreInt?
notesString?
@@allow('all',true)}modelWineStyle{idInt @id @default(autoincrement())nameString @uniquecolorStringwinesWine[]
@@allow('all',true)}modelSodaextendsDrink{carbonatedBoolean
@@allow('all',true)}modelCocktailextendsDrink{mixBoolean
@@allow('all',true)}modelContainer{barcodeString @iddrink_idIntdrinkDrink @relation(fields: [drink_id],references: [id])typeContainerTypevolumeIntportionsInt?
inventoryInt @default(0)
@@allow('all',true)}modelManufacturer{idInt @id @default(autoincrement())country_idStringcountryCountry @relation(fields: [country_id],references: [code])nameString @uniquedescriptionString?
imageString?
drinksDrink[]
@@allow('all',true)}modelCountry{codeString @idnameStringmanufacturersManufacturer[]
@@allow('all',true)}
Description and expected behavior
I have a model which uses inheritance. When creating a query with the enhanced client, I can use all the fields from the base model and the derived model in my where clause. However, only the field from the derived model work.
Environment
Code
It is trying to add the
gluten
check to thebeer
table, but this information is stored in the parentdrink
table.The text was updated successfully, but these errors were encountered: