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
* feat: add support for nullable relations
- Detect nullable return types in relationship methods
- Mark nullable relations as optional (?) in TypeScript output
- Handle union types containing null (e.g., BelongsTo|Listing|null)
- Handle single nullable types (e.g., ?BelongsTo)
* fix: use explicit | null for nullable relations instead of optional ?
- Changed nullable relations to use 'Type | null' instead of 'Type?'
- More explicit and follows TypeScript best practices
- Optional relations (via config) still use '?' syntax
* test: add tests for nullable relations
- Add tests for WriteRelationship nullable handling
- Add tests for ModelInspector nullable detection
- Make isReturnTypeNullable public for testability
- Test nullable union types (e.g., BelongsTo|Listing|null)
- Test nullable named types (e.g., ?BelongsTo)
- Test non-nullable relations
- Test nullable plural relations
* refactor: remove unnecessary tests and keep method protected
- Remove tests for isReturnTypeNullable (implementation detail)
- Keep isReturnTypeNullable protected (not public API)
- Keep tests for WriteRelationship (public behavior)
- All 116 tests passing
* wip
* perform assertion
---------
Co-authored-by: tanner <tcamp022@gmail.com>
0 commit comments