What problem does it solve?
SeaORM 2.0 introduces breaking API and workflow changes compared to SeaORM 1.0, and the most common mistakes come from carrying old assumptions (entity structure, column typing, query composition, and eager-loading patterns) into new code.
Core Features & Use Cases
- Entity-first 2.0 models: Define relations directly on the
Model using #[sea_orm::model] and relation attributes like has_one, has_many, belongs_to, self_ref.
- Strongly-typed columns: Use
Entity::COLUMN for compile-time type safety and safer filters/expressions instead of the older untyped Column API.
- Correct ActiveModel workflow: Build nested inserts/updates via the 2.0 builder pattern and understand
insert vs save semantics to avoid unexpected writes.
- Efficient eager loading: Use the
Entity::load() API and .with(...) to avoid N+1 queries through joins/data-loader behavior.
- Migration guidance & anti-patterns: Learn the 1.0 -> 2.0 renames, removed APIs, required imports (e.g.,
ExprTrait), and platform-specific gotchas (PostgreSQL identity/serial, SQLite integer mapping).
Quick Start
Ask the skill to explain how to migrate one of your existing SeaORM 1.0 entities and queries to SeaORM 2.0, including the updated entity definition, strongly-typed column usage, and the correct eager-loading approach for your relations.