Skip to content

Bind EntityFactory to invoking UserContext metadata - #146

Merged
philipgreat merged 2 commits into
mainfrom
fix/entity-factory-context-134
Sep 23, 2026
Merged

philipgreat merged 2 commits into
mainfrom
fix/entity-factory-context-134

Conversation

@philipgreat

Copy link
Copy Markdown
Contributor

Partial #134 remediation. EntityFactory.forContext(context) and forMetadata(metadata) bind entity creation to an explicit metadata snapshot; the no-argument global factory is deprecated with a migration hint. The new two-runtime test registers the same entity type name in two independent runtimes, poisons the process-global metadata, and verifies each context still produces its own entity class. This PR is stacked after #145 and changes only EntityFactory plus its regression test. JDK 21 focused test, full Maven reactor, all Java examples, and diff check passed on head b2397d0. Legacy BaseEntity.addRelation and deprecated no-context compatibility paths remain open, so this does not close #134.

@philipgreat
philipgreat changed the base branch from fix/repository-metadata-fail-134 to main September 23, 2026 03:36
@philipgreat

Copy link
Copy Markdown
Contributor Author

Exact-head 1c14f98 CI passed: Build and Test 35815009536 (including trusted-data OWASP scan and retained report), examples 35815009533, PostgreSQL/MySQL 35815009528. Local JDK 21 two-runtime EntityFactoryContextTest passed after merging current main. This adds context/metadata-bound factories and deprecates, but does not remove, the legacy global factory; #134 remains partially open.

@philipgreat
philipgreat marked this pull request as ready for review September 23, 2026 03:41
@philipgreat
philipgreat merged commit e2109fd into main Sep 23, 2026
3 checks passed
@philipgreat
philipgreat deleted the fix/entity-factory-context-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.

Audit legacy global metadata fallbacks without regressing context-owned relation loading

1 participant