SeaORM 2.0.2
Enhancements
- Add
require_oneto fetch exactly one row, erroring if none: a non-optional counterpart toone()that returns the item directly and yieldsDbErr::RecordNotFoundwhen no row matches, so call sites can use?instead of unwrapping anOption. Available onSelector/SelectorRawand theSelect,SelectTwo, andSelectTwoRequiredwrappers #3164 - Add
date_time_default_nowschema helper — a column defaulting toExpr::current_timestamp()#3159 - Add
timestamp_default_nowandtimestamp_with_time_zone_default_nowschema helpers, mirroringdate_time_default_nowfor the timestamp family #3165
Bug Fixes
- CLI: deduplicate grouped vs individual imports when regenerating entities with
--preserve-user-modifications, so a user-groupeduse foo::{A, B}is recognised as equivalent to the freshly generateduse foo::A; use foo::B;and no longer emitted twice #3163