Skip to content

Fix codegen and macro edge cases - #3158

Open
k-bx wants to merge 2 commits into
SeaQL:masterfrom
k-bx:echo-im-seaorm-2.0.1-fixes
Open

Fix codegen and macro edge cases#3158
k-bx wants to merge 2 commits into
SeaQL:masterfrom
k-bx:echo-im-seaorm-2.0.1-fixes

Conversation

@k-bx

@k-bx k-bx commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • avoid generated FromQueryResult/model identifier collisions with fields named row or pre
  • support active enums containing a variant named Error
  • add an option to include generated columns during entity generation and omit PostgreSQL partial unique constraints from generated entity metadata

Validation

  • cargo test -p sea-orm-macros --test derive_active_enum_test --test derive_entity_model_column_name_test
  • cargo test --manifest-path sea-orm-cli/Cargo.toml --lib test_generate_entity_skips_postgres_partial_unique_constraints

Comment thread sea-orm-macros/src/derives/active_enum.rs Outdated
@k-bx

k-bx commented Aug 6, 2026

Copy link
Copy Markdown
Author

Implemented the review feedback in PR #3158. I replaced the generated signature in with (as requested). Commit: 62b5411.

@k-bx

k-bx commented Aug 6, 2026

Copy link
Copy Markdown
Author

Implemented the review feedback in PR #3158. I replaced the generated TryFrom<&str> signature in ActiveEnum with std::result::Result<Self, sea_orm::DbErr> as requested.
Commit: 62b5411.

@Huliiiiii

Copy link
Copy Markdown
Member

I'd like to merge the macro hygiene part first. Could you split the new CLI flag changes into a separate PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants