You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Autocomplete does not work for arguments after the first one in @relation() (issue)
Actions show up in auto complete even without preview feature (issue)
Reacted by beeman, Stephan, Benjamin Kroeger, André Ribeiro, cyberhazard, Hiển Lê, Mickaël Olaria, Omar Zahid, Albert Luta, Pascal Sthamer and 12 more
Reacted by beeman, André Ribeiro, Marco Wettstein, cobnett3 and Ruslan Gonzalez
Reacted by beeman, André Ribeiro, cyberhazard, Bradley K. Ochola, Damien Duhamel, Mickaël Olaria, Edward, Omar Zahid, Nickesh, Florian Wendelborn and 10 more
Reacted by beeman, André Ribeiro, Omar Zahid, Florian Wendelborn, cobnett3, Julius de Bruijn, Ruslan Gonzalez, Sylver, Tuni-Soft and David Axelrod
Reacted by beeman, Omar Zahid, Deel96, Julius de Bruijn, Colin Salomons and Ruslan Gonzalez
Reacted by beeman, Damien Duhamel, cobnett3, Christian Angelo M Sulit, Ruslan Gonzalez and Geova Jonnatha Correia da Silva
changed the title [-]Placeholder issue for referential actions preview feature[/-][+][Placeholder] Preview feature feedback: Referential Actions (`...`)[/+]on Jun 22, 2021
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.
Hey I just upgraded to 2.26.0 deleted node_modules. But the Prisma Language Server is keeping saying to me:
The preview feature "referentialActions" is not known. Expected one of: microsoftSqlServer, orderByRelation, nApi, selectRelationCount, orderByAggregateGroup, filterJson
@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 2.26.0 of the extension as well (usually happens automatically, but sometimes doesn't).
@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:
[Info - 10:22:44] Default version of Prisma binary 'prisma-fmt': 9b816b3aa13cc270074f172f30d6eda8a8ce867d
[Info - 10:22:44] Extension name @prisma/language-server with version 2.26.0
[Info - 10:22:44] Prisma CLI version: 2.26.0
Using binary path from Prisma Language Server configuration.
[Info - 10:22:46] Local prisma-fmt path: /home/ciesloks/Dev/prisma-fmt/prisma-fmt
Binary test successful.
Using binary path from Prisma Language Server configuration.
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 :)
Reacted by Jan Piotrowski, Florian Wendelborn, André Ribeiro, Sven, Tuni-Soft, Harshit Pant and Kat
Reacted by André Ribeiro
Reacted by Jan Piotrowski, Camille Louédoc-Eyriès, Julius de Bruijn and André Ribeiro
@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?
if you're adding this feature to your relation fields, why isn't being reflected in the SQL files generated by the migration command?
That should be the case with the preview feature enabled in 2.26.0. If not, that is a bug.
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?
Yes, all this should be fully picked up with the preview feature enabled in 2.26.0.
Referential actions can not be specified on relations in implicit many-to-many relations. This limitation can be worked around by switching to explicit many-to-many relations and specifying the referential actions on the relations in the relations table.
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 db pull / introspect and the table would show up in your prisma schema.
Reacted by Pablo Sáez, Jan Piotrowski and Harshit Pant
Activity
[-]Placeholder issue for referential actions preview feature[/-][+][Placeholder] Preview feature feedback: Referential Actions (`...`)[/+][-][Placeholder] Preview feature feedback: Referential Actions (`...`)[/-][+][Placeholder] Preview feature feedback: Referential Actions (`referentialActions`)[/+][-][Placeholder] Preview feature feedback: Referential Actions (`referentialActions`)[/-][+]Preview feature feedback: Referential Actions (`referentialActions`)[/+]FlorianWendelborn commentedon Jun 29, 2021
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.
janpio commentedon Jun 29, 2021
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.
diegoazh commentedon Jun 30, 2021
Thanks for your effort and work and for delivering this greater feature. 👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽
SvenC56 commentedon Jun 30, 2021
Hey I just upgraded to
2.26.0deletednode_modules. But the Prisma Language Server is keeping saying to me:janpio commentedon Jun 30, 2021
@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
2.26.0of the extension as well (usually happens automatically, but sometimes doesn't).SvenC56 commentedon Jun 30, 2021
@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:
janpio commentedon Jun 30, 2021
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.
Mikastark commentedon Jun 30, 2021
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 :)
ruslanguns commentedon Jul 1, 2021
@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.
ruslanguns commentedon Jul 1, 2021
@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?
janpio commentedon Jul 2, 2021
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.
cobnett3 commentedon Jul 2, 2021
It worked! Great!!
PabloSzx commentedon Jul 6, 2021
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?
tomhoule commentedon Jul 6, 2021
@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
db pull/introspectand the table would show up in your prisma schema.tlindener commentedon Jul 13, 2021
janpio commentedon Jul 13, 2021
tlindener commentedon Jul 14, 2021
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
2color commentedon Sep 7, 2021
Closing this now that this has been released to General Availability in the 3.0.1 release