Object relation doesn't compile to TypeScript
I have an explicit many-to-many relation that I want to display data. After migrating from version 0.11 to version 0.12, I can't find a way to display objects of my entity. Here is my schema:
When i try to display products for material error occurs:
Since I have migrated from an old version of Wasp, in which my code works, I'm curious about what makes the difference that in the previous version, the import from
I have found a previous post and solution which includes creating a new type. Is there any way to include objects with types from
entity Material {=psl
id Int @id @default(autoincrement())
code String @unique
name String
count Int
measurementUnit String
products ProductMaterials[]
psl=}
entity ProductMaterials {=psl
product Product @relation(fields: [productId], references: [id])
productId Int
material Material @relation(fields: [materialId], references: [id])
materialId Int
materialCount Int
measurementUnit String
@@id([productId, materialId])
psl=}
entity Product {=psl
id Int @id @default(autoincrement())
code String @unique
name String
description String
materials ProductMaterials[]
productionPlans ProductionPlanProducts[]
psl=}
When i try to display products for material error occurs:
Property 'products' does not exist on type 'GetResult<{ id: number; code: string; name: string; count: number; measurementUnit: string; }, unknown> & {}'.Since I have migrated from an old version of Wasp, in which my code works, I'm curious about what makes the difference that in the previous version, the import from
@wasp/entities includes objects of entities, and in the new version, the import from wasp/entities doesn't include them.I have found a previous post and solution which includes creating a new type. Is there any way to include objects with types from
prisma/entities?

