Repository navigation
Replies: 2 comments 1 reply
|
@bkiac 👋 I don't think this is possible right now as you cannot use the field from the 1st query into another with Prisma's transaction flow so you would need to use a single raw query for now in this case. This should improve once this request is done so I would suggest adding a 👍 along with your use case as well :) |
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that haven’t had any recent activity and appear to be outdated. If this discussion is still important to you or unresolved, we’d love to hear from you! Feel free to reopen it or start a new one with updated details. For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and being part of the community! |
Uh oh!
There was an error while loading. Please reload this page.
I have a schema where one of my models has an unsupported PostGIS polygon type:
This is my current code to create a field with a cultivation:
I would like to ensure transactionality on the database level but I'm not sure how. I can't use nested writes with
prisma.cultivation.createbecause I can't set the field's polygon field and I can't wrap them inprisma.$transactionbecause I need the field's id to create the cultivation.Is there a way to somehow combine dependent writes with raw queries?
As a last resort, I could create the cultivation in the same raw query as the field but I'm hoping for something simpler.
Thanks!
All reactions