Skip to content

[Bug] Zmodel error "Custom-typed field is only supported with "postgresql" provider" if using @json in a model in a separate zmodel file #1833

@onimitch

Description

@onimitch

Description and expected behavior
As per title, I'm trying to use the json field types.

type TestData {
    tag            String? //TagType?
    eventId             String?
}

model Test {
    id   String   @id @default(cuid())
    data TestData @json
}

error on the line with @JSON: "Custom-typed field is only supported with "postgresql" provider"

This file is included into my main schema which has this for db:

datasource db {
    provider = 'postgresql'
    url = env('DATABASE_URL')
    directUrl = env('DATABASE_URL_NON_POOLING')
}

It seems the error doesn't happen if I paste the Test model inside the main schema file, so my conclusion is that it's simply an issue being in separate files.

Environment (please complete the following information):

  • ZenStack version: 2.8.0
  • Prisma version: 5.22.0
  • Database type: Postgresql

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions