question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent PascalCasing for DMMF type names for array fields

See original GitHub issue

Bug description

I found that Prisma generates wrong input names in DMMF for array fields:

          "name": "UserUpdatetestInput",
          "constraints": {
            "maxNumFields": 1,
            "minNumFields": 1
          },
          "fields": [
          "name": "UserCreateManytestInput",
          "constraints": {
            "maxNumFields": 1,
            "minNumFields": 1
          },
          "fields": [

It’s related to previous issue #5302.

How to reproduce

Generate Prisma Client for schema with array type field model.

Expected behavior

I would expect consistent type names to be always PascalCase.

Prisma information

model User {
  id          Int      @id @default(autoincrement())
  test        String[]
}

Environment & setup

  • OS: Windows 10 @ WSL 2 (Ubuntu 20.04)
  • Database: PostgreSQL
  • Node.js version: v15.3.0
  • Prisma version:
prisma               : 2.20.1
@prisma/client       : 2.20.1
Current platform     : debian-openssl-1.1.x
Query Engine         : query-engine 60ba6551f29b17d7d6ce479e5733c70d9c00860e (at node_modules/@prisma/engines/query-engine-debian-openssl-1.1.x)
Migration Engine     : migration-engine-cli 60ba6551f29b17d7d6ce479e5733c70d9c00860e (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 60ba6551f29b17d7d6ce479e5733c70d9c00860e (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary        : prisma-fmt 60ba6551f29b17d7d6ce479e5733c70d9c00860e (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 60ba6551f29b17d7d6ce479e5733c70d9c00860e
Studio               : 0.365.0
Preview Features     : orderByRelation, selectRelationCount, napi

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
matthewmuellercommented, Apr 14, 2021

UserCreateManytestInput is intentional because fields are case-sensitive.

0reactions
MichalLytekcommented, Dec 8, 2021

@pantharshit00 Can I help and contribute to that one on Prisma Engine side? I would need pointing into the right files 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is pascal case? - TheServerSide.com
Pascal case -- or PascalCase -- is a programming naming convention where the first letter of each compound word in a variable is...
Read more >
Prisma 2.17.0 Release - GitClear
Written in PascalCase (for example, VarChar or Text ); Prefixed by @db , where db is the name of the datasource block in...
Read more >
TypeScript: Strange behaviour when switching between ...
I load JSON data from the webserver and create an array of the above Info class. It doesn't seem to matter, if the...
Read more >
@prisma/cli: Versions | Openbase
With this release, we've added support for more native database types: BigInt ... leading to N+1 issues · Inconsistent PascalCasing for DMMF type...
Read more >
Pascal Case: under_scores, camelCase and PascalCase
In camel casing, names start with a lower case but each proper ... The general practice for a C style language like Java...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found