Back to Sea Orm

2.0.0 Rc.39

changelog/2.0.0-rc.39.md

2.0.02.9 KB
Original Source

Release Notes: SeaORM 2.0.0-rc.39

(since 2.0.0-rc.38)

Dependency Upgrades

SeaQuery 1.0, SeaSchema 0.18, and SQLx 0.9 (#3074)

SeaORM now builds on the stable SeaQuery 1.0 release and SQLx 0.9. This is the main payload of rc.39:

  • sea-query is now ~1.0.0
  • sea-query-sqlx is now 0.9.0
  • sea-schema and sea-schema-sync are now 0.18.0
  • sqlx and sqlx-core are now 0.9.0

Runtime and driver feature wiring has been updated for SQLx 0.9's split runtime and TLS feature names. sea-orm-migration, sea-orm-cli, examples, and sea-orm-sync have been kept in sync with the new dependency graph.

Compatibility notes:

  • This RC is dependency-breaking relative to rc.38 because it promotes SeaQuery, SeaSchema, and SQLx to their next major/minor release lines.
  • sea-query is intentionally constrained to ~1.0.0, allowing 1.0.x patches without automatically accepting 1.1.x.
  • No intentional schema-discovery or entity-generation behavior change is expected from the dependency upgrade itself, aside from the frontend import fix listed below.

MSRV updates

The async crate now requires Rust 1.94.0. sea-orm-sync now requires Rust 1.88.0.

New Features

Async closure transaction helpers (#3074)

DatabaseConnection and DatabaseTransaction now expose inherent async-closure transaction helpers:

rust
db.transaction_async(async |txn| {
    bakery::Entity::insert(active_model).exec(txn).await?;
    Ok(())
})
.await?;

The existing TransactionTrait::transaction and TransactionTrait::transaction_with_config APIs are still available. The new inherent methods provide a forward-compatible path with async closures while preserving the trait API for existing users.

Optional db.statement recording in tracing spans (#3045)

ConnectOptions::record_stmt_in_spans(false) disables recording full SQL text into the db.statement tracing field while still emitting database operation spans:

rust
let mut opt = ConnectOptions::new(DATABASE_URL);
opt.record_stmt_in_spans(false);

This is useful for deployments that want query timing and operation visibility without storing statement text in traces. The default remains true.

Bug Fixes

Use wasm-compatible Instant for wasm32 (#3071)

The rusqlite driver now uses a wasm-compatible time source on wasm32, avoiding std::time::Instant issues in wasm builds.

Generate correct imports in frontend entity output (#3037)

The code generator now emits the required imports for frontend-format entities using date/time, decimal, UUID, vector, network, JSON, and array column types. This fixes generated frontend entity files that previously referenced those types without importing them.

Examples

Examples were refreshed for the rc.39 dependency versions. Loco, Seaography, and React Admin examples keep local sea-orm / sea-orm-migration patches so CI and local checks exercise the workspace crates instead of resolving the last published RC.