GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(p2002): correct modelName in nested create unique constraint errors #29595 by AnupamKumar-1 · Pull Request #29628 · prisma/orm fix(p2002): correct modelName in nested create unique constraint errors #29595 #29628New issueHave 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
Merged
aqrln
merged 13 commits into
prisma:main
from
AnupamKumar-1:fix/29595-p2002-nested-modelname
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
25ec568
fix(p2002): correct modelName in nested create unique constraint errors
AnupamKumar-1 436b98f
Merge branch 'main' into fix/29595-p2002-nested-modelname
AnupamKumar-1 4f69e7c
Fix @@map model name resolution for nested P2002 errors
AnupamKumar-1 15473d0
Handle P2002 modelName resolution across adapters
AnupamKumar-1 cf04b6a
Fix MSSQL parsing and qualified model resolution
AnupamKumar-1 7ec509b
Merge remote-tracking branch 'origin/main' into fix/29595-p2002-neste…
tensordreams 368c585
Refine P2002 table extraction and table->model mapping
tensordreams 979276e
Merge origin/main into fix/29595-p2002-nested-modelname
tensordreams 9b47584
test(adapter-pg): expect derived table for default-named constraint (…
tensordreams b73aa17
fix(client): carry per-model schema in runtime data model for P2002 m…
tensordreams a90a7b2
Merge remote-tracking branch 'origin/main' into worktree-agent-a59fba…
tensordreams 7d609fa
Merge remote-tracking branch 'origin/main' into fix/29595-p2002-neste…
tensordreams cb5e35f
test(client): update Prisma.dmmf snapshot for pruned model schema field
tensordreams File filterConversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page. Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page. Diff viewDiff view
fix(client): carry per-model schema in runtime data model for P2002 m…
…apping Add each model's `@@schema` value to the (pruned) runtime data model and use it in `modelNameForTable` so that two models mapped to the same table name in different database schemas resolve to the correct Prisma model name for P2002 `meta.modelName`, instead of giving up and falling back to the top-level model. The query compiler's DMMF already emits per-model `schema`; only the client-side pruning dropped it, so no engine change is required. When the reported table is not schema-qualified the lookup keeps the previous bare-table behavior and still returns `undefined` on genuine ambiguity. Also rewrite the P2002 table-forwarding unit test to assert via `expect(...).toThrow` instead of a manual try/catch.
Uh oh!
There was an error while loading. Please reload this page.
commit b73aa17ed4d0cfa7d52a5bdb813e46712d08cdb9
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
packages/client/src/runtime/utils/modelNameForTable.test.ts
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |