Skip to content

Commit 0fd676c

Browse files
committed
[SeaORM] edit
1 parent f350ff8 commit 0fd676c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

SeaORM/docs/05-basic-crud/04-insert.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@ assert_eq!(
191191

192192
## Returning Inserted Models
193193

194+
:::tip Since `2.0.0`
195+
196+
`Entity::insert` and `Entity::insert_many` are now separate types, the `exec_with_returning` method have the appropriate return type. So `exec_with_returning_many` is now deprecated.
197+
198+
:::
199+
194200
Supported by Postgres and SQLite, the following returns the newly inserted models after insert.
195201

196202
```rust

SeaORM/docs/06-relation/09-nested-selects.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ Because the tables `cake` and `bakery` have some duplicate column names, we'd ha
5353

5454
## Nested Models
5555

56+
:::tip Since `2.0.0`
57+
58+
```rust
59+
#[derive(DerivePartialModel)]
60+
#[sea_orm(entity = "cake::Entity", from_query_result)]
61+
// ^^^^^^^^^^^^^^^^^ no longer needed
62+
```
63+
64+
:::
65+
5666
[`DerivePartialModel`](https://docs.rs/sea-orm/latest/sea_orm/derive.DerivePartialModel.html) allows you to omit the custom selects and aliases.
5767
The previous example can be written as:
5868
```rust

0 commit comments

Comments
 (0)