You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump crate versions to 0.8.6 and add several fixes and improvements: preserve in-memory relation runtime state when overwriting models from JSON, rework raw SQL -> JSON conversion to decode backend-aware column types (booleans, JSON/JSONB, UUID, date/time, decimals using rust_decimal) instead of relying on probe order, and add Send bounds so NestedSaveBuilder can be moved across await points or into tokio::spawn. Also remove the misleading Model::load_all_translations helper, cache the email validation regex with OnceLock, update docs/examples and changelog, and refresh macro outputs to emit relation-state refreshes. Tests added for raw JSON typed decoding and nested-save spawning; compile-fail snapshots updated accordingly.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,25 @@ All notable changes to TideORM will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.8.6] - 2026-03-21
9
+
10
+
### Fixed
11
+
12
+
- Preserved loaded `HasOne`, `HasMany`, `BelongsTo`, and `HasManyThrough` relation runtime state when model helpers overwrite a model from JSON, so translation and file-attachment updates no longer silently discard cached relations.
13
+
- Reworked raw SQL JSON row conversion to decode backend-aware column types instead of relying on a fragile probe order, preserving booleans and improving JSON, UUID, date/time, and decimal handling.
14
+
- Added `Send` bounds to nested relation save operation erasure so `NestedSaveBuilder` remains `Send` and can safely cross await points or be moved into `tokio::spawn` tasks.
15
+
16
+
### Changed
17
+
18
+
- Removed the misleading `Model::load_all_translations()` helper. Use `get_all_translations()`, `get_translations_for_language()`, or `to_json_with_all_translations()` depending on whether you need per-field values, a single-language projection, or full JSON output.
19
+
- Cached the email validation regex with `OnceLock` instead of compiling it on every validation call.
20
+
- Refreshed dependency examples and macro-crate docs to use the 0.8.6 release version.
21
+
22
+
### Internal
23
+
24
+
- Updated relation compile-fail snapshots to match the attribute-macro test fixtures.
25
+
- Verified the release prep with `cargo test --all-features`, `cargo clippy --lib --all-features -- -D warnings`, and `mdbook build`.
26
+
8
27
## [0.8.5] - 2026-03-20
9
28
10
29
### Fixed
@@ -587,7 +606,8 @@ This is the first public release of TideORM, a developer-friendly ORM for Rust w
Copy file name to clipboardExpand all lines: docs/models.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -906,6 +906,8 @@ let (user, related_json) = NestedSaveBuilder::new(user)
906
906
907
907
`save_with_many` batches related inserts through TideORM's bulk insert path, and `delete_with_many` removes related rows with a single `WHERE IN` delete. `update_with_many` batches existing related rows through an upsert-style write and then reloads them once. If any related model still looks new, `update_with_many` falls back to per-row updates so create-vs-update semantics stay unchanged.
908
908
909
+
`NestedSaveBuilder` is `Send`, so you can hold it across await points or move it into task executors such as `tokio::spawn` before calling `.save()`.
910
+
909
911
### Join Result Consolidation
910
912
911
913
Transform flat JOIN results into nested structures:
`Model::load_all_translations()` is no longer available because applying every translation directly onto scalar model fields was misleading and lossy. Use `get_all_translations()` for field-level access, `get_translations_for_language()` for one language at a time, or `to_json_with_all_translations()` when you need a full JSON payload.
0 commit comments