// the find
SeaQL/sea-orm
🐚 A powerful relational ORM for Rust
SeaORM is an async ORM for Rust targeting PostgreSQL, MySQL, MariaDB, and SQLite, built on top of SQLx and Tokio. Version 2.0 (currently RC) is a significant redesign with nested ActiveModel persistence, an entity-first schema sync workflow, and a smarter N+1-avoiding loader. It's aimed at Rust developers building web services who want something closer to ActiveRecord or Django ORM than raw SQLx.
The Smart Entity Loader's automatic choice between JOIN (1-1) and data-loader pattern (1-N) is genuinely useful — it eliminates the N+1 problem without forcing you to think about it every time. The raw_sql! macro is a good design: it gives you escape-hatch SQL with named parameter interpolation and array expansion while making injection structurally harder than format strings. Nested ActiveModel persistence — inserting a full object graph with dependency ordering handled automatically — removes a whole category of boilerplate from transactional writes. The sea-orm-sync crate for synchronous SQLite access is a practical addition for CLI tools that don't need an async runtime.
SeaORM 2.0 is still in release candidate as of the latest commit, with 40+ RC versions listed in the changelog — that release cadence suggests ongoing churn and the API surface is not yet stable for production adoption. The entity-first schema sync feature (db.get_schema_registry(...).sync(db)) is a footgun: auto-applying schema changes to a live database based on in-memory entity state is the kind of thing that destroys data if you run it against prod by accident, and the README doesn't prominently warn about this. The compile times are painful on any non-trivial schema — the proc macro expansion for derived entities is heavy and this gets worse the more tables you have. SQL Server support is commercial and locked behind a form submission, which is a reasonable business decision but means the multi-database story has a meaningful gap for enterprise users.