diff --git a/docs/pages/writing-data/create.mdx b/docs/pages/writing-data/create.mdx index e6d28866..52a6f26e 100644 --- a/docs/pages/writing-data/create.mdx +++ b/docs/pages/writing-data/create.mdx @@ -81,7 +81,7 @@ let comment: comment::Data = client .comment() .create( "content".to_string(), - // If post wasn't required, then the equals() would need + // If post wasn't required, then this would need // to be wrapped in comment::post::connect(..). post::id::equals("id".to_string()) vec![] @@ -107,9 +107,9 @@ use prisma::{comment, post}; let comment: comment::Data = client .comment() - .create( + .create_unchecked( "content".to_string(), - // requires specifying field for postID, + // requires providing value for postID foreign key, // rather than connecting a relation 0, vec![] diff --git a/docs/pages/writing-data/update.md b/docs/pages/writing-data/update.md index 2d3b37a8..32f1e937 100644 --- a/docs/pages/writing-data/update.md +++ b/docs/pages/writing-data/update.md @@ -60,8 +60,9 @@ use prisma::{comment, post}; let comment: comment::Data = client .comment() - .update( + .update_unchecked( comment::id::equals("some comment id".to_string()), + // can't `connect` relations, but can set foreign keys directly vec![comment::post_id::set("some post id".to_string())] ) .exec()