How do I create a map structure with prisma that holds the key value pair? #138
Comments
Hey @suhailgupta03 👋 you should be able to model this with the |
I just read that. It says there is a limitation of This is what I am trying to achieve. For a website, I want to create a map, where each key i.e. the
I feel this will easily exceed |
Hmm this seems tricky indeed, maybe this is a Prisma 1 limitation for this use case then 😕 Have you considered Prisma 2.0 for this, I don't think it has the same size limitation for using |
From what I have read Prisma 2.0 is in the beta stage? Should I be using that on production systems? @nikolasburk |
Prisma Client is very close to being production-ready and we've seen a lot of folks successfully using it in production already. One of the main reasons why we haven't officially released it yet because we're working on upgrade guides for Prisma 1 users, but Prisma Client is already very stable. You can find more info here: http://isprisma2ready.com/ |
Article Title (if relevant)
Provide the name and link to the article with the issue
Describe the content issue
A clear and concise description of what the issue with the content was
I need to create a storage schema where it resembles the following:
Here
key1
,key2
, ..keyn
are dynamic and not known beforehand. I could not find a way with Prisma to achieve this. Any help with the documentation or is this not possible at all with Prisma?Describe the solution you'd like to see
How can this issue be resolved?
Please see the above points.
Additional context
Add any other context or screenshots about the feature request here.
The only way I can is to have an array of objects.
But then this is not the optimal way, since there will be a lot many entries and I will have to iterate over the complete list to find the
key1
and then gets its valueThe text was updated successfully, but these errors were encountered: