Skip to content

Commit 2f93589

Browse files
committed
Regenerate sea-orm-sync and add #2880 changelog entry
1 parent 5207a4b commit 2f93589

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

changelog/2.0.0-rc.41.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ model is not needed. Unlike `update`, it runs `before_save` but skips
6363

6464
### Bug Fixes
6565

66+
**Generated entities compile when an enum name collides with a generated identifier** (#2880, #2153)
67+
68+
When a PostgreSQL enum's name matches a generated identifier (`Model`, `Entity`,
69+
`ActiveModel`, `Column`, `PrimaryKey`, `Relation`), `sea-orm-cli` now imports the
70+
active enum under an aliased name (e.g. `Foo as FooEnum`) instead of emitting a
71+
conflicting `use` that failed to compile.
72+
6673
**`serde(rename_all)` no longer breaks `ActiveModel::from_json` defaulting** (#2855, #2854)
6774

6875
Regression from #2842: a `#[serde(rename_all = "...")]` container attribute (or

sea-orm-sync/src/query/json.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ use serde_json::Map;
33
pub use serde_json::Value as JsonValue;
44

55
impl FromQueryResult for JsonValue {
6+
/// # Warnings
7+
/// If the database does not provide a data type for a value, that value may be lost.
68
#[allow(unused_variables, unused_mut)]
79
fn from_query_result(res: &QueryResult, pre: &str) -> Result<Self, DbErr> {
810
let mut map = Map::new();

0 commit comments

Comments
 (0)