Code Layout fix + small logical error - #872
Merged
Merged
Conversation
Need to update Prisma-examples as well
well as per example, it was ok,
As '-' is used to highlight delete lines
Contributor
|
馃 |
ankur-arch
added a commit
that referenced
this pull request
Jul 7, 2026
* docs(orm/next): add data modeling guides Add a data modeling section under Prisma Next docs with three pages: - Overview: models, primary keys (how to pick), scalar fields (how to pick a type), and relations - Relational databases: 1:1, 1:n, m:n (implicit + explicit), and polymorphic relations, plus foreign-key ownership guidance - MongoDB: documents, embed-vs-reference, references, and polymorphic collections Register the section in the Next nav. Note: relation snippets use the in-flight directional `@relation(from:, to:)` syntax and implicit m:n from the unmerged PSL relation-syntax stack (prisma/prisma-next #872-876); verify before publishing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(orm/next): drop MongoDB many-to-many section Remove the many-to-many modeling content from the MongoDB guide entirely. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(data-modeling): plain language, tested syntax, structured key guidance Revision per review feedback, with every schema snippet emit-tested against @prisma-next 0.14.0 (PostgreSQL app + MongoDB app): - Rewrite intros in plain language: idea first, blog example second, terms last. Remove all em dashes. The docs-writer skill gains a "Teach in plain language" section codifying this for other PRs. - Fix syntax that the published packages reject: @relation(from:, to:) does not exist (unsupported argument on 0.14.0 and on main, which accepts fields/references/map/onDelete/onUpdate), so all examples use @relation(fields:, references:). Implicit many-to-many and @relation(through:) are also rejected ("use an explicit join model"), so the m:n section now teaches the explicit junction model as the working pattern and names the implicit form as not supported yet. Verified as PASS: composite @@id junctions, @@discriminator/@@base (both layouts, SQL and Mongo), Mongo type blocks (single + list), uuid()/autoincrement defaults. - Fix broken rendering: bare (1:1) / (1:n) / (m:n) were parsed as remark directives and rendered as "(1\n)". Now backticked; verified intact in rendered HTML. - Break dense guidance into scannable subsections with code blocks: natural vs surrogate keys (Country ISO example, User/Product with @unique), surrogate type choice, data type choice (zip/priceCents/ publishedAt examples), and "Which side owns the foreign key" as an assertive checklist. - MongoDB shown explicitly with tab switchers where it differs (primary keys), cross-links to Fundamentals for querying each shape, "Prompt your coding agent" sections, direct link phrasing. - Park the DR-8679 redirect map, commented out, in next.config.mjs under the shared "Prisma Next URL cutover (DR-8687)" block. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(skill): record the house guide style for hands-on pages Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(data-modeling): note explicit discriminator on variant creates (live-tested) Verified against a fresh Prisma Postgres database: variant ORM roots exist and base queries return variant rows, but creating through a variant does not auto-fill the discriminator on 0.14.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(data-modeling): sidebar as a Data Modeling section with Overview first Sidebar now reads Data Modeling > Overview / Relational data modeling / MongoDB data modeling, per review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Need to update Prisma-examples as well