fix: @changelog annotations on unmanaged associations#301
fix: @changelog annotations on unmanaged associations#301stefanrudi wants to merge 8 commits intomainfrom
Conversation
stefanrudi
commented
Apr 29, 2026
- Guard col.keys access to prevent crash for unmanaged associations
- Fix SQLite trigger OF clause using wrong column name (assocName_fkField → fkField)
- Fix SQLite buildAssocLookup WHERE using entity PK instead of FK field
- Deduplicate OF clause columns in SQLite and HANA triggers
- Add optimization to skip unnecessary subselect when @changelog path matches on-condition target key
- Add test
SummaryThe following content is AI-generated and provides a summary of the pull request: Fix:
|
There was a problem hiding this comment.
The PR fixes several real bugs around unmanaged associations in change tracking (crash on col.keys, wrong column names in OF clauses, incorrect WHERE clause in buildAssocLookup, and duplicate column deduplication). The core fixes are sound, but there are concerns worth addressing: the onMapping parsing logic duplicates an existing helper (extractFKFieldsFromOnCondition) that should be reused; the "skip subselect" optimization's path-matching logic appears logically unreachable for typical label paths like descr; and the schema change adding @changelog to status4Nav likely produces duplicate change log entries alongside the already-tracked scalar status4 field.
PR Bot Information
Version: 1.20.37
- File Content Strategy: Full file content
- Event Trigger:
pull_request.opened - LLM:
anthropic--claude-4.6-sonnet - Correlation ID:
b16d13b8-4681-4d4e-ac7f-d69fac4ee2d2