diff --git a/SeaORM/docs/0.12.x-CHANGELOG_temp.md b/SeaORM/docs/0.12.x-CHANGELOG_temp.md index 01c63dbcd5f..70787f7996f 100644 --- a/SeaORM/docs/0.12.x-CHANGELOG_temp.md +++ b/SeaORM/docs/0.12.x-CHANGELOG_temp.md @@ -326,7 +326,6 @@ assert!(matches!(res, Ok(TryInsertResult::Conflicted))); * Upgrade `sea-schema` to `0.12` https://github.com/SeaQL/sea-orm/pull/1562 * Upgrade `clap` to `4.3` https://github.com/SeaQL/sea-orm/pull/1468 -================================ All Changes above was being Documented ================================ ### Bug Fixes * Fixed `DeriveActiveEnum` throwing errors because `string_value` consists non-UAX#31 compliant characters https://github.com/SeaQL/sea-orm/pull/1374 @@ -364,6 +363,7 @@ pub enum StringValueVariant { _0x300x20123, } ``` + ================================ All Changes above was being Documented ================================ * [sea-orm-cli] The implementation of `Related` with `via` and `to` methods will not be generated if there exists multiple paths via an intermediate table. Like in the schema defined below - Path 1. `users <-> users_votes <-> bills`, Path 2. `users <-> users_saved_bills <-> bills` https://github.com/SeaQL/sea-orm/pull/1435 ```sql CREATE TABLE users diff --git a/SeaORM/docs/09-schema-statement/02-create-enum.md b/SeaORM/docs/09-schema-statement/02-create-enum.md index 7d036251f6a..b288bd3a3bf 100644 --- a/SeaORM/docs/09-schema-statement/02-create-enum.md +++ b/SeaORM/docs/09-schema-statement/02-create-enum.md @@ -64,6 +64,41 @@ assert_eq!( ); ``` +Note that non-UAX#31 compliant characters would be converted. +For example, +```rust +#[derive(Clone, Debug, PartialEq, EnumIter, DeriveActiveEnum)] +#[sea_orm(rs_type = "String", db_type = "String(None)")] +pub enum StringValue { + #[sea_orm(string_value = "")] + Member1, + #[sea_orm(string_value = "$")] + Member2, + #[sea_orm(string_value = "$$")] + Member3, + #[sea_orm(string_value = "AB")] + Member4, + #[sea_orm(string_value = "A_B")] + Member5, + #[sea_orm(string_value = "A$B")] + Member6, + #[sea_orm(string_value = "0 123")] + Member7, +} +``` +will now produce the following Variant Enum: +```rust +pub enum StringValueVariant { + __Empty, + _0x24, + _0x240x24, + Ab, + A0x5Fb, + A0x24B, + _0x300x20123, +} +``` + ## Native Database Enum Enum support is different across databases. Let's go through them one-by-one.