Brendonovich / prisma-client-rust

Type-safe database access for Rust
https://prisma.brendonovich.dev
Apache License 2.0
1.8k stars 104 forks source link

create a record with relation in link table #202

Closed swaitw closed 1 year ago

swaitw commented 1 year ago
Hi, i got tree tabls like this: user table: id email
user role table: id name
user to user role table: user_id role_id

so is there a way i can link the user to the user role at the same time when create a new user. thanks

Brendonovich commented 1 year ago

Doing that would require creating a nested record, which Prisma supports but PCR does not yet. That is being tracked in #44