Skip to content

Conversation

@martzoukos
Copy link
Contributor

Describe this PR

We're adding a notice that Composite types are not supported in Studio, Data Browser and Query Console. If a user tries to open a model with composite types, Studio and Data Browser will crash with an error.
As such, a first disclaimer is to let people know of this behavior, before we proceed to fix or suppress the actual issues.

Changes

Added the notification:

Composite types or embedded documents are not supported in Prisma Studio, the Data Browser or the Query Console.
in the following places:

  • Getting Started > Set up Prisma > Add to existing project > MongoDB > Next Steps
  • Getting Started > Set up Prisma > Start from scratch > MongoDB > Next Steps
  • Concepts > Database connectors > MongoDB#Known Limitations

Here's what it looks like:
image

@netlify
Copy link

netlify bot commented Mar 30, 2022

Deploy Preview for prisma2-docs ready!

Name Link
🔨 Latest commit 7ef0fe8
🔍 Latest deploy log https://app.netlify.com/sites/prisma2-docs/deploys/62444dfebedee4000968e4a4
😎 Deploy Preview https://deploy-preview-3025--prisma2-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link
Contributor

This PR changes the following pages (Netlify Preview Deploy links):

(Note that links will only be valid after Netlify preview deploy succeeded)

@tanberry
Copy link
Contributor

tanberry commented Mar 30, 2022

Thanks @martzoukos for creating this PR; this is important information, for sure!

I think the places you have it are good, but I am thinking we might want also need it in some even more obvious places:

  1. The start of the Getting Started docs:
  1. The new Using Prisma with MongoDB guide that @keerlu is writing

  2. The docs about Studio: https://www.prisma.io/docs/concepts/components/prisma-studio

  3. The PDP docs: https://www.prisma.io/docs/concepts/data-platform/about-platform

  4. The Concepts doc about composite types: https://www.prisma.io/docs/concepts/components/prisma-client/composite-types

Or is that too wide a net?
(And this is a situation where we could really benefit from implementing "reusable content", so that we could have a single snippet that is reused in all these places!)

Copy link
Contributor

@tanberry tanberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @martzoukos for this PR. I tweaked the wording a bit to try to make it clear that what we call composite types are same, in MongoDB, as embedded documents.


<Admonition type="warning">

[Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types) or [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) are not supported in Prisma Studio, the Data Browser or the Query Console.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types) or [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) are not supported in Prisma Studio, the Data Browser or the Query Console.
[Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types), known as [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) in MongoDB, are not supported in Prisma Studio, the Data Browser, or the Query Console.


<Admonition type="warning">

[Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types) or [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) are not supported in Prisma Studio, the Data Browser or the Query Console.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types) or [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) are not supported in Prisma Studio, the Data Browser or the Query Console.
[Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types), known as [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) in MongoDB, are not supported in Prisma Studio, the Data Browser, or the Query Console.

- Management of `@unique` indexes is realized through `db push`
- [`@@id`](/reference/api-reference/prisma-schema-reference#id-1) and [auto-increment](/reference/api-reference/prisma-schema-reference#generate-auto-incrementing-integers-as-ids) are **not** supported.
- Error handling is incomplete.
- [Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types) or [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) are not supported in Prisma Studio, the Data Browser or the Query Console.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types) or [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) are not supported in Prisma Studio, the Data Browser or the Query Console.
- [Composite types](https://www.prisma.io/docs/concepts/components/prisma-schema/data-model#defining-composite-types), known as [embedded documents](https://docs.mongodb.com/manual/core/data-model-design/#std-label-data-modeling-embedding) in MongoDB, are not supported in Prisma Studio, the Data Browser, or the Query Console.

@janpio
Copy link
Contributor

janpio commented Mar 30, 2022

Quick note: We might actually get composite type "support" until next week in Studio, so do not spend to much more time on finding ways how to tell people that this is not supported.

@matthewmueller
Copy link
Contributor

I think we can close this? https://prisma-company.slack.com/archives/C013RMLGE72/p1648832839575889

@janpio janpio closed this Apr 1, 2022
@janpio
Copy link
Contributor

janpio commented Apr 1, 2022

Yes, the change in Studio does make this notice obsolete.

@janpio janpio deleted the composite-types-nosupport-studio branch April 1, 2022 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants