Skip to content

feat: attach relations with invoking context metadata - #149

Merged
philipgreat merged 4 commits into
mainfrom
fix/context-owned-add-relation-134
Sep 23, 2026
Merged

philipgreat merged 4 commits into
mainfrom
fix/context-owned-add-relation-134

Conversation

@philipgreat

Copy link
Copy Markdown
Contributor

Partial #134 follow-up stacked after #146. Adds Entity.addRelation(context, relationName, value) and deprecates the process-global overload. The legacy call now fails with a migration hint if global metadata is absent. A same-type-name two-runtime test exercises different relation descriptors while global metadata is wrong or null. JDK 21 focused and full Maven tests, all Java examples, and diff check passed locally. Keep draft until predecessor merges and exact-head CI passes.

@philipgreat

Copy link
Copy Markdown
Contributor Author

Additional exact-head local verification: the complete examples script was rerun with JAVA_HOME and PATH pinned to JDK 21.0.6. It exited 0 and reported PASS: all Java examples. The earlier examples run used the machine default JDK 25; this second run is the CI-version evidence. Test-generated SQLite DB and .local files remain unstaged.

@philipgreat
philipgreat changed the base branch from fix/entity-factory-context-134 to main September 23, 2026 03:44
@philipgreat

Copy link
Copy Markdown
Contributor Author

Additional review finding on current head 7c602cc: the new context-bearing addRelation path originally returned silently for an absent entity descriptor, unknown relation, or scalar property. It now fails explicitly on those invalid inputs; the deprecated no-context overload keeps its compatibility behavior. JDK 21 focused regression and the full BaseEntityTest class passed locally after this change. Exact-head hosted checks are pending.

@philipgreat

Copy link
Copy Markdown
Contributor Author

Exact-head 7c602cc CI passed: Build and Test 35815504619 (including trusted-data OWASP scan and retained reports), examples 35815507308, PostgreSQL/MySQL 35815504620. Local JDK 21 focused regression and full BaseEntityTest passed. The new context-bearing addRelation rejects missing entity metadata, unknown relations, and scalar properties rather than silently dropping the attachment. The deprecated no-context path remains compatibility-only; #134 still needs the final call-path classification audit.

@philipgreat
philipgreat marked this pull request as ready for review September 23, 2026 03:49
@philipgreat
philipgreat merged commit 1ce9fff into main Sep 23, 2026
4 checks passed
@philipgreat
philipgreat deleted the fix/context-owned-add-relation-134 branch November 23, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant