CHANGELOG

This commit is contained in:
Billy Chan 2023-01-12 17:28:39 +08:00
parent d9102f0b64
commit ca205543a3
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7

View File

@ -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>