Cannot proceed to insert object X relation since insert to table X affects zero rows
See original GitHub issueI want to insert a new opsOrder, and vehicle in single mutation.
It runs without error if vehicle does not exist.
But when vehicle is exist, it cannot be done. The return error message: cannot proceed to insert object relation \"vehicle\" since insert to table \"vehicle\" affects zero rows
I also added on_conflict constraint.
What should I do in above situation. Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Unable to insert array relationship in Hasura / GraphQL ...
I am using the Apollo iOS client to connect to our Hasura/postgress docker environment. I am trying to create an object and fill...
Read more >Postgres: Upsert mutation | Hasura GraphQL Docs
An upsert query will insert an object into the database in case there is no conflict with another row in the table. In...
Read more >4. Inserting, Updating, Deleting - SQL Cookbook [Book]
The technique is to insert into a view that is defined as the UNION ALL of the tables. If the check constraints are...
Read more >Error when you update a row of a table - SQL Server
This article provides a workaround for the problem that occurs when you try to update a table by using SQL Server Management Studio...
Read more >13.3.6 LOCK TABLES and UNLOCK TABLES Statements
The error occurs for the first INSERT because there are two references to the same name for a locked table. The second INSERT...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have a unique constraint on a generated field (which stores the lower case version of the name of the record) - so that cannot be updated. My (ugly) workaround is to have a blank field that I write null to…
@samuela The workaround is to use the same column(s) that determine the uniqueness constraint. This way no new row is added. Although, this may have the side effect of executing any update triggers on the underlying table.