New issue
Have 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
Preview feature feedback: Referential Actions (referentialActions
)
#7816
Comments
...
)
...
)referentialActions
)
referentialActions
)referentialActions
)
The new cascade feature works very well for me now. Upgrading was very simple and I could remove some of the hacks around cascade not working properly (I previously had a transaction that first deleted all related elements and then deleted the item itself). Only thing that’s missing is as far as I can see the documentation. It’s documented well in the release, but the docs still claim that cascade is impossible. |
Documentation PR is in the works and will be merged in the coming days. It's a complex topic, but all the necessary information should be in the release notes for now - and we will expand on that as soon as possible. Thanks for the positive feedback @FlorianWendelborn - and thanks for trying it out so quickly. |
Thanks for your effort and work and for delivering this greater feature. 👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽 |
Hey I just upgraded to
|
@SvenC56 The language server is independent and needs to be updated via the Prisma extension you are using, probably VSCode. Make sure you are running |
@janpio thank you for your fast feedback. I keep getting this message. I reinstalled the Prisma VSCode Plugin and restarted VSCode. This is the Output from the language server:
|
That version looks correct. Can you open an issue over at https://github.com/prisma/language-tools/issues please? Then we can take a look at it and ask related questions. |
Amazing feature. Just tried it for one little project in production and it works like a charm. I overuse cascade deletes, and for now it seems stable to me :) |
@SvenC56 I think you should try uninstall prisma from your devDependencies, as well as your @prisma/client from your dependencies, then uninstall the extension from VScode (make sure you restart Vscode as well). Then install all again and try it, I did exactly that and worked to me. |
@janpio that is an amazing waiting feature. Thank you really much. I'm just wondering, 1) if you're adding this feature to your relation fields, why isn't being reflected in the SQL files generated by the migration command? and in the other hand, 2) if you are using introspection feature to get accesses to an existent database which already supports on delete configurations, will the introspection get those details (or some of them) in the generated prisma schema? |
That should be the case with the preview feature enabled in 2.26.0. If not, that is a bug.
Yes, all this should be fully picked up with the preview feature enabled in 2.26.0. |
It worked! Great!! |
How can I migrate existing implicit many-to-many to explicit many-to-many without losing any data to be able to use this workaround? |
@PabloSzx I don't know if there is a better solution, but one approach would be renaming the table (it should be called something like _ModelAToModelB) to something else, then using |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Seems like I looked at the wrong place when creating a smaller project. I created a ticket with an approach to reproduce the issue: #8264 |
Closing this now that this has been released to General Availability in the 3.0.1 release |
Please share your feedback about the
referentialActions
functionality released in v2.26.0 in this issue.If you have any questions, don't hesitate to ask them in the
#prisma-client
channel in the Prisma Slack.Known Limitations
VSCode extension/language tool
@relation()
(issue)The text was updated successfully, but these errors were encountered: