|
2 | 2 |
|
3 | 3 | All notable changes to TypeBridge will be documented in this file. |
4 | 4 |
|
| 5 | +## [1.2.6] - 2026-02-01 |
| 6 | + |
| 7 | +### New Features |
| 8 | + |
| 9 | +#### Polymorphic Role Player Type Resolution (PR #92) |
| 10 | +- **Role players now resolve to their concrete Python types** |
| 11 | + - When querying relations with abstract role types, role players are resolved to concrete types (e.g., `Person` instead of `Profile`) |
| 12 | + - Uses TypeQL `label()` function to fetch type labels and resolve to correct Python class |
| 13 | + - Location: `type_bridge/crud/relation/manager.py` |
| 14 | + |
| 15 | +#### Relations as Role Players |
| 16 | +- **Fixed hydration for relations serving as role players** |
| 17 | + - Relations can now properly participate as role players in other relations |
| 18 | + - Comprehensive test suites added for this pattern |
| 19 | + - Location: `type_bridge/crud/relation/manager.py` |
| 20 | + |
| 21 | +### Improvements |
| 22 | + |
| 23 | +#### Modular Helper Methods (PR #92) |
| 24 | +- **Extracted reusable helper methods for DRY refactoring** |
| 25 | + - `_resolve_entity_class_from_label()` - Resolves concrete types using TypeQL `label()` function |
| 26 | + - `_hydrate_entity_from_data()` - Helper for role player instantiation |
| 27 | + - Eliminates duplicate code in `get()` and `get_by_iid()` methods |
| 28 | + |
| 29 | +#### Generator Enhancements (PR #92) |
| 30 | +- **Improved code generation for relations** |
| 31 | + - Role cardinality annotations now properly rendered |
| 32 | + - Docstrings and type annotations rendering improvements |
| 33 | + - Location: `type_bridge/generator/` |
| 34 | + |
| 35 | +### Bug Fixes |
| 36 | + |
| 37 | +#### Polymorphic Role Validation (PR #92) |
| 38 | +- **Fixed polymorphic role validation and role player IIDs** |
| 39 | + - Correct handling of abstract types in role player resolution |
| 40 | + - Fixed role player IID extraction in polymorphic queries |
| 41 | + |
| 42 | +#### Test Fixes (PR #92) |
| 43 | +- Fixed `manager.count()` → `manager.filter().count()` in tests |
| 44 | +- Renamed attribute types to avoid naming collisions |
| 45 | + |
| 46 | +### Testing |
| 47 | + |
| 48 | +- **19 new integration tests** (`tests/integration/queries/test_social_network_queries.py`) |
| 49 | + - Deep inheritance (3-level: Entity → Profile → Person/Organization) |
| 50 | + - Self-referential symmetric relations (Friendship) |
| 51 | + - Geographic hierarchy chains (Person → City → Country) |
| 52 | + - Polymorphic role players with concrete type verification |
| 53 | + - Multi-value attributes with `@card(0..*)` |
| 54 | + - Chained relations and complex filter combinations |
| 55 | + |
| 56 | +### Key Files Modified |
| 57 | + |
| 58 | +- `type_bridge/crud/relation/manager.py` - Polymorphic role player resolution |
| 59 | +- `type_bridge/generator/render/` - Role cardinality and annotations rendering |
| 60 | +- `tests/integration/queries/test_social_network_queries.py` - New comprehensive tests |
| 61 | + |
5 | 62 | ## [1.2.5] - 2026-01-31 |
6 | 63 |
|
7 | 64 | ### New Features |
|
0 commit comments