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
Unable to use UNLESS CONFLICT with user assigned .id #4302
Comments
The tricky thing in this case is that the Maybe we want a way to say "unless conflict if it conflicts with something of the same type, otherwise error" |
One way would be to bind something like a In addition we can make the "unless conflict if it conflicts with something of the same type, otherwise error" to be the default behavior (with a clear explanation in the raised |
(also, we really need to be including the "detail" and "hint" in client binding error renderings) |
The nice thing, though, is that
|
any update? thanks |
Apologies for the late response. This is not an issue for me anymore. The solution from @msullivan works fine. |
Faced with it too, really annoying because it's not an intuitive and workaround looks very ugly :-( |
This seems like the ideal default behavior. |
Hello, could this feature be added to v4? I am waiting to construct a perfect batch upsert( The way I currently implement it is to use a multi step with help of js) in pure edgeql. Considering the conditional DML will support in v4, if I can use this with it, that would save life. |
This won't be changed in 4.0, but conditional DML gives another way to handle it, by doing |
I just test conditional DML in 4.0, it perfect solve this problem. So strong,This problem no longer bothers me anymore. Here is my solution.
In this solution you don't need to enable |
i am trying to create a copy of existing data on edgedb. all my entities already use UUIDs, so I am trying to upsert using
but i see that id cannot be used with else clause. i see this error
UNLESS CONFLICT can not use ELSE when constraint is from a parent type
Schema:
The text was updated successfully, but these errors were encountered: