Error when disconnecting m:n relation with string-id-model
See original GitHub issueBug description
Following error occurs when disconnecting m:n relation between models where one has string id:
Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: ConversionError(ParseIntError { kind: InvalidDigit }
0: backtrace::backtrace::trace
1: backtrace::capture::Backtrace::new_unresolved
2: failure::backtrace::internal::InternalBacktrace::new
3: <failure::backtrace::Backtrace as core::default::Default>::default
4: sql_query_connector::row::row_value_to_prisma_value
5: <quaint::connector::result_set::result_row::ResultRow as sql_query_connector::row::ToSqlRow>::to_sql_row
6: <std::future::GenFuture<T> as core::future::future::Future>::poll
7: std::future::poll_with_tls_context
8: <std::future::GenFuture<T> as core::future::future::Future>::poll
9: query_core::interpreter::query_interpreters::read::read_related::{{closure}}
10: <std::future::GenFuture<T> as core::future::future::Future>::poll
11: <std::future::GenFuture<T> as core::future::future::Future>::poll
12: <std::future::GenFuture<T> as core::future::future::Future>::poll
13: <std::future::GenFuture<T> as core::future::future::Future>::poll
14: <std::future::GenFuture<T> as core::future::future::Future>::poll
15: <std::future::GenFuture<T> as core::future::future::Future>::poll
16: <std::future::GenFuture<T> as core::future::future::Future>::poll
17: <std::future::GenFuture<T> as core::future::future::Future>::poll
18: std::future::poll_with_tls_context
19: <std::future::GenFuture<T> as core::future::future::Future>::poll
20: <std::future::GenFuture<T> as core::future::future::Future>::poll
21: std::panicking::try::do_call
22: __rust_maybe_catch_panic
23: <std::future::GenFuture<T> as core::future::future::Future>::poll
24: tokio::task::core::Core<T>::poll
25: std::panicking::try::do_call
26: __rust_maybe_catch_panic
27: tokio::task::harness::Harness<T,S>::poll
28: tokio::runtime::thread_pool::worker::GenerationGuard::run_task
29: tokio::runtime::thread_pool::worker::GenerationGuard::run
30: std::thread::local::LocalKey<T>::with
31: tokio::runtime::thread_pool::worker::Worker::run
32: tokio::task::core::Core<T>::poll
33: std::panicking::try::do_call
34: __rust_maybe_catch_panic
35: tokio::task::harness::Harness<T,S>::poll
36: tokio::runtime::blocking::pool::Inner::run
37: tokio::runtime::context::enter
38: std::sys_common::backtrace::__rust_begin_short_backtrace
39: std::panicking::try::do_call
40: __rust_maybe_catch_panic
41: core::ops::function::FnOnce::call_once{{vtable.shim}}
42: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
43: std::sys::unix::thread::Thread::new::thread_start
44: _pthread_start
) })
at PrismaClientFetcher.request (node_modules/@prisma/client/runtime/index.js:1:47490)
How to reproduce
Occurs when executing the following code in call prisma.post.update
:
const post0 = await prisma.post.create({ data: {} });
const category0 = await prisma.category.create({
data: {
posts: { connect: { id: post0.id } }
}
});
await prisma.post.update({
where: {
id: post0.id
},
data: {
categories: {
disconnect: {
id: category0.id
}
}
}
});
Prisma information
schema.prisma has the following models:
model Post {
id Int @id @default(autoincrement())
categories Category[]
}
model Category {
id String @id @default(uuid())
posts Post[]
}
Environment & setup
- OS: Mac OS
- Database: PostgreSQL
- Prisma version: 2.0.0-preview024
- Node.js version: v13.1.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Disconnecting Many-to-Many Relationships in Prisma + MySQL
The "disconnect" operation cannot disconnect deeply-nested relations. It only disconnects documents directly connected to the model in question.
Read more >Disconnect with implicit many-to-many does not work #5946
Bug description Models with implicit many-to-many relationships are unable to disconnect those relations. How to reproduce model Post { id ...
Read more >This device has either stopped responding or has been ...
This device has either stopped responding or has been disconnected. Hello,. Windows 10 Pro x64, build 19042.928. Randomly, when I access an ...
Read more >Disconnect Reasons and Error Messages - NetMotion
Error Code State of. Mobility Client Message /Description
1 Graceful disconnect
25 •Failover System is out of memory.
26 •Retry (reconnect) More data.
Read more >Fixing account errors when social accounts become ...
Reconnect or disconnect a social media account from your Constant Contact account when it causes an "Account Error" · Repair the connection ...
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
@pantharshit00 Can confirm this bug is resolved with
2.0.0-beta.1
.I am also unable to reproduce this now with
2.0.0-beta.1
.@lskuper @TrueSkrillor Can you please try again with this version and report back?