github SeaQL/sea-orm 2.0.2

latest release: sea-orm-cli@2.0.2
5 hours ago

SeaORM 2.0.2

Enhancements

  • Add require_one to fetch exactly one row, erroring if none: a non-optional counterpart to one() that returns the item directly and yields DbErr::RecordNotFound when no row matches, so call sites can use ? instead of unwrapping an Option. Available on Selector / SelectorRaw and the Select, SelectTwo, and SelectTwoRequired wrappers #3164
  • Add date_time_default_now schema helper — a column defaulting to Expr::current_timestamp() #3159
  • Add timestamp_default_now and timestamp_with_time_zone_default_now schema helpers, mirroring date_time_default_now for the timestamp family #3165

Bug Fixes

  • CLI: deduplicate grouped vs individual imports when regenerating entities with --preserve-user-modifications, so a user-grouped use foo::{A, B} is recognised as equivalent to the freshly generated use foo::A; use foo::B; and no longer emitted twice #3163

Don't miss a new sea-orm release

NewReleases is sending notifications on new releases.