Skip to content

Commit

Permalink
docs: ModelTrait::delete (SeaQL/sea-orm#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Dec 22, 2021
1 parent 764d615 commit 03993cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SeaORM/docs/05-basic-crud/05-delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Find a `Model` from the database, then convert it into `ActiveModel`, finally de

```rust
let orange: Option<fruit::Model> = Fruit::find_by_id(30).one(db).await?;
let orange: fruit::ActiveModel = orange.unwrap().into();
let orange: fruit::Model = orange.unwrap();

let res: DeleteResult = orange.delete(db).await?;
assert_eq!(res.rows_affected, 1);
Expand Down

0 comments on commit 03993cf

Please sign in to comment.