Prisma Studio getting an error after a successful save operation on a many to many MongoDB relationship
What I'm doing: Adding some categories to the blueprint. I successfully added 2 categories to the same blueprint and after successfully saving the data and adding the ids of the 2 categories to the array, it started breaking. Ids of the selected categories are not added to the array and the cell itself is red.
I cleared indexedBD and restarted studio, tried it in other browsers and in incognito mode, but the problem could not be solved. Please help with a solution.

- Prisma version (
prisma -vornpx prisma -v):
prisma : 3.12.0-dev.10
@prisma/client : 3.11.0
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 3f4e645b4b21517662fa7940520ce0b50303cb11 (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli 3f4e645b4b21517662fa7940520ce0b50303cb11 (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core 3f4e645b4b21517662fa7940520ce0b50303cb11 (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt 3f4e645b4b21517662fa7940520ce0b50303cb11 (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : 3f4e645b4b21517662fa7940520ce0b50303cb11
Studio : 0.458.0
Preview Features : fullTextIndex, extendedIndexes, mongoDb
- Logs from Developer Tools Console or Command line, if any:
logs localhost-1647873424237.log logs localhost-1647873471985.log
- Does the issue persist even after updating to the latest
prismaCLI dev version? (npm i -D prisma@dev)
Yes
- Prisma schema (if relevant):
model Blueprint {
id String @id @default(auto()) @map("_id") @db.ObjectId
ID Int? @unique
categories Category[] @relation(fields: [categoryIds], references: [id])
categoryIds String[] @db.ObjectId
}
model Category {
id String @id @default(auto()) @map("_id") @db.ObjectId
ID Int?
name String
blueprints Blueprint[] @relation(fields: [blueprintsIds], references: [id])
blueprintsIds String[] @db.ObjectId
}
Note: This from the logs is interesting
index.js:1 [StringListInput.constructor] Invalid initialValue {initialValue: undefined}
vendor.js:27 B {path: 'StringListInput.constructor', code: undefined, type: undefined, message: 'Invalid initialValue', stack: undefined, …}
and
vendor.js:297 invalid row index for ensureIndexVisible: 0
o.ensureIndexVisible @ vendor.js:297
vendor.js:50 [mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: 'Reaction[Autorun@7428]' TypeError: Cannot read properties of undefined (reading 'length')
at e.getColumn (vendor.js:229)
at e.getGridColumn (vendor.js:229)
at e.setFocusedCell (vendor.js:297)
at t.setFocusedCell (vendor.js:297)
at index.js:1
at vendor.js:50
at s (vendor.js:50)
at ac (vendor.js:50)
at e.track (vendor.js:50)
at e.onInvalidate (vendor.js:50)
Hello! I keep getting this same error. I need to operate on implicit m:n relationships, but this bug prevents me from doing so. Could you help me solve this problem.
@Signaturo Unfortunately, I have no capacity at the moment to check
Do you still have this issue with the latest version (3.15.0)?
Hey :wave:
Prisma ORM 7 introduces a brand new standalone Studio, built from the ground up to work everywhere, with or without Prisma ORM. Consequently, all "old Studio" issues are being closed as there won't be any further work on it. :mega:
The new Studio is also available in the Prisma VS Code extension and in the Prisma Console application. :electric_plug:
Help shape, improve and fix the new Studio with us in this repository by submitting bug reports and feature requests. :construction_worker: