We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running zenstack generate for below model files
zenstack generate
generator client { provider = "prisma-client-js" } datasource db { provider = "postgresql" url = env('DATABASE_URL') } plugin prisma { provider = '@core/prisma' output = './prisma/schema.prisma' } model User { id String @id @default(uuid()) @db.Uuid todos Todo[] @@auth @@allow('all', true) } model Todo { id String @id @default(uuid()) @db.Uuid user_id String @db.Uuid user User @relation(fields: [user_id], references: [id]) images File[] @relation("todo_images") documents File[] @relation("todo_documents") @@allow('all', true) } model File { id String @id @default(uuid()) @db.Uuid s3_key String @unique label String todo_image_id String? @db.Uuid todo_image Todo? @relation("todo_images", fields: [todo_image_id], references: [id]) todo_document_id String? @db.Uuid todo_document Todo? @relation("todo_documents", fields: [todo_document_id], references: [id]) @@allow('all', true) }
The backLink generated model-meta.js is incorrect:
backLink
const metadata = { fields:{ file:{ ... todo_document: { name: "todo_document", type: "Todo", isDataModel: true, isOptional: true, attributes: [{ "name": "@relation", "args": [{ "value": "todo_documents" }] }], backLink: 'images', // here should be **documents** isRelationOwner: true, foreignKeyMapping: { "id": "todo_document_id" }, }, ... } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Running
zenstack generate
for below model filesThe
backLink
generated model-meta.js is incorrect:The text was updated successfully, but these errors were encountered: