CHANGELOG
This commit is contained in:
parent
d9102f0b64
commit
ca205543a3
10
CHANGELOG.md
10
CHANGELOG.md
@ -64,12 +64,12 @@ fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>
|
|||||||
fn try_get_by<I: ColIdx>(res: &QueryResult, index: I) -> Result<Self, TryGetError>;
|
fn try_get_by<I: ColIdx>(res: &QueryResult, index: I) -> Result<Self, TryGetError>;
|
||||||
```
|
```
|
||||||
* The `ActiveModelBehaviour` trait becomes async trait https://github.com/SeaQL/sea-orm/pull/1328
|
* The `ActiveModelBehaviour` trait becomes async trait https://github.com/SeaQL/sea-orm/pull/1328
|
||||||
For anyone who implement the `ActiveModelBehaviour` with default implementation (no*op). No code changes is required.
|
```rust
|
||||||
```rs
|
// For anyone who implement the `ActiveModelBehaviour` with default implementation (no*op).
|
||||||
|
// No code changes is required.
|
||||||
impl ActiveModelBehavior for ActiveModel {}
|
impl ActiveModelBehavior for ActiveModel {}
|
||||||
```
|
|
||||||
If you overridden the default implementation:
|
// However, if you overridden the default implementation:
|
||||||
```rs
|
|
||||||
#[async_trait::async_trait]
|
#[async_trait::async_trait]
|
||||||
impl ActiveModelBehavior for ActiveModel {
|
impl ActiveModelBehavior for ActiveModel {
|
||||||
async fn before_save<C>(self, db: &C, insert: bool) -> Result<Self, DbErr>
|
async fn before_save<C>(self, db: &C, insert: bool) -> Result<Self, DbErr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user