@@ -17,7 +17,30 @@ fn get_arity_of<E: EntityTrait>() -> usize {
17
17
}
18
18
```
19
19
* Associate ` ActiveModel ` to ` EntityTrait ` https://github.com/SeaQL/sea-orm/pull/2186
20
+ * [ sea-orm-macros] Added ` rename_all ` attribute to ` DeriveEntityModel ` & ` DeriveActiveEnum ` https://github.com/SeaQL/sea-orm/pull/2170
21
+ ``` rust
22
+ #[derive(DeriveEntityModel )]
23
+ #[sea_orm(table_name = " user" , rename_all = " camelCase" )]
24
+ pub struct Model {
25
+ #[sea_orm(primary_key)]
26
+ id : i32 ,
27
+ first_name : String , // firstName
28
+ #[sea_orm(column_name = " lAsTnAmE" )]
29
+ last_name : String , // lAsTnAmE
30
+ }
20
31
32
+ #[derive(EnumIter , DeriveActiveEnum )]
33
+ #[sea_orm(rs_type = " String" , db_type = " String(StringLen::None)" , rename_all = " camelCase" )]
34
+ pub enum TestEnum {
35
+ DefaultVariant , // defaultVariant
36
+ #[sea_orm(rename = " kebab-case" )]
37
+ VariantKebabCase , // variant-kebab-case
38
+ #[sea_orm(rename = " snake_case" )]
39
+ VariantSnakeCase , // variant_snake_case
40
+ #[sea_orm(string_value = " CuStOmStRiNgVaLuE" )]
41
+ CustomStringValue , // CuStOmStRiNgVaLuE
42
+ }
43
+ ```
21
44
### Enhancements
22
45
23
46
* Added ` ActiveValue::set_if_not_equals() ` https://github.com/SeaQL/sea-orm/pull/2194
@@ -562,7 +585,7 @@ assert!(matches!(res, Ok(TryInsertResult::Conflicted)));
562
585
563
586
* Fixed ` DeriveActiveEnum ` throwing errors because ` string_value ` consists non-UAX #31 compliant characters https://github.com/SeaQL/sea-orm/pull/1374
564
587
``` rust
565
- #[derive(DeriveActiveEnum )]
588
+ #[derive(EnumIter , DeriveActiveEnum )]
566
589
#[sea_orm(rs_type = " String" , db_type = " String(None)" )]
567
590
pub enum StringValue {
568
591
#[sea_orm(string_value = "" )]
0 commit comments