|
3 | 3 | 1.x Changelog |
4 | 4 | ============= |
5 | 5 |
|
| 6 | +.. changelog:: 1.8.0 |
| 7 | + :date: 2025-10-28 |
| 8 | + |
| 9 | + .. change:: ensure `has_dict_attribute` checks for `__dict__` attribute |
| 10 | + :type: bugfix |
| 11 | + :pr: 579 |
| 12 | + |
| 13 | + The previous implementation used `isinstance` against the `DictProtocol` type returned `True` for any object. |
| 14 | + The `isinstance` call is replaced with `hasattr` (which should also be faster). With this change, I believe the `DictProtocol` class could also be removed, but I kept the changes to a minimum. |
| 15 | + |
| 16 | + .. change:: adding string representation to StoredObject |
| 17 | + :type: bugfix |
| 18 | + :pr: 582 |
| 19 | + |
| 20 | + Issues running migration created for `advanced_alchemy.types.FileObject` column on a model. |
| 21 | + |
| 22 | + .. change:: surface FileObject session errors; align commit/rollback semantics |
| 23 | + :type: bugfix |
| 24 | + :pr: 580 |
| 25 | + :issue: 543 |
| 26 | + |
| 27 | + - Previously save/delete failures were only logged, so callers believed commits succeeded when storage ops had already failed. |
| 28 | + - Sync commit: processes saves sequentially, then deletes. Logs failures with tracebacks and re-raises. Ignores FileNotFoundError on delete. Stops on first save error. Clears internal state only on full success. |
| 29 | + - Async commit: runs saves and deletes concurrently via asyncio.gather. Logs each failure with exc_info. Raises the first real Exception, and lets BaseException (e.g., CancelledError) bubble. Attempts deletes even if a save fails. Clears state only on full success. |
| 30 | + - Rollback (sync/async): deletes only files saved during the current transaction. Ignores FileNotFoundError. Logs and re-raises other errors. Clears state after processing. |
| 31 | + - Tracking: records successful saves in _saved_in_transaction for targeted rollback cleanup; state is retained on error to allow inspection/retry. |
| 32 | + |
| 33 | + .. change:: add `sort_order` to mixin columns for consistent table layout |
| 34 | + :type: feature |
| 35 | + :pr: 581 |
| 36 | + |
| 37 | + - Add sort_order=-100 to primary key columns (id) across all mixins |
| 38 | + - Add sort_order=3001 to sentinel column |
| 39 | + - Add sort_order=3002 to created_at audit column |
| 40 | + - Add sort_order=3003 to updated_at audit column |
| 41 | + |
| 42 | + This ensures consistent column ordering in generated tables: |
| 43 | + primary keys first, user columns in middle, audit/sentinel columns last. |
| 44 | + |
| 45 | + .. change:: use `property` in `SQLAlchemyDTO` with `MappedAsDataclass` |
| 46 | + :type: feature |
| 47 | + :pr: 447 |
| 48 | + |
| 49 | + Allow better compatibility with `MappedAsDataclass` and the `SQLALchemyDTO` |
| 50 | + |
| 51 | + .. change:: add support for SQLAlchemy func expressions in filter classes |
| 52 | + :type: feature |
| 53 | + :pr: 585 |
| 54 | + :issue: 519 |
| 55 | + |
| 56 | + Adds support for SQLAlchemy func() expressions in filter classes to eliminate type checker errors when using database functions like `func.random()` or `func.lower()` |
| 57 | + |
| 58 | + **Changes** |
| 59 | + |
| 60 | + - Updated `OrderBy`, `BeforeAfter`, `OnBeforeAfter`, `CollectionFilter`, `NotInCollectionFilter`, `ComparisonFilter` |
| 61 | + - Enhanced `_get_instrumented_attr()` to handle new types |
| 62 | + - Mock repositories extract field names from `InstrumentedAttribute`, raise helpful error for func expressions (can't execute SQL in-memory) |
| 63 | + - Added integration tests for func expressions |
| 64 | + |
| 65 | + Note: Different databases use different function names (PostgreSQL: `func.random()`, MySQL: `func.rand()`, SQL Server: `func.newid()`) |
| 66 | + |
6 | 67 | .. changelog:: 1.7.0 |
7 | 68 | :date: 2025-10-13 |
8 | 69 |
|
|
0 commit comments