Skip to content

docs: native enum rs_type = "Enum" breaking change in 2.0#180

Open
lethib wants to merge 1 commit into
SeaQL:masterfrom
lethib:docs/native-enum-rs-type-v2
Open

docs: native enum rs_type = "Enum" breaking change in 2.0#180
lethib wants to merge 1 commit into
SeaQL:masterfrom
lethib:docs/native-enum-rs-type-v2

Conversation

@lethib

@lethib lethib commented Jul 2, 2026

Copy link
Copy Markdown

PR Info

New Features

  • N/A

Bug Fixes

  • N/A

Breaking Changes

  • Documents a breaking change introduced in SeaORM 2.0: native database enums now use rs_type = "Enum" instead of rs_type = "String". The ActiveEnum::Value associated type is now sea_query::Enum (carrying the enum type name as metadata) rather than String, which changes the signatures of to_value (now returns sea_query::Enum) and try_from_value (now expects &sea_query::Enum). String-backed (rs_type = "String") and integer-backed (rs_type = "i32") enums are unaffected. This is a docs-only PR describing that change.

Changes

  • 04-generate-entity/04-enumeration.md (the ActiveEnum page): update the Native Database Enum examples to rs_type = "Enum", and add a Since 2.0.0 note explaining the new sea_query::Enum value type, its struct shape, and how to convert to/from String.
  • 09-schema-statement/02-create-enum.md: update the Native Database Enum example to rs_type = "Enum" and cross-link to the ActiveEnum page.

@lethib lethib changed the title docs: native enum rs_type = "Enum" breaking change in 2.0 docs: native enum rs_type = "Enum" breaking change in 2.0 Jul 2, 2026
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.

sea-orm-cli generate entity emits rs_type = "Enum" instead of rs_type = "String" for PostgreSQL native enums

1 participant