docs: compare JPA cascades with Storm write sets (reference + tutorial)#272
Merged
Conversation
…orial - New reference page under Resources: the same Owner-Pet-Visit graph in both models, the direction inversion (cascades travel parent-to-child along collections, write set discovery follows FK fields upward), the managed-graph vs explicit-operation trade-off stated symmetrically, verb-by-verb mapping, and a cascade translation table - New tutorial at /tutorials/object-graphs in the From JPA series, with the hub card and series count - Cross-links from the write-sets reference and the JPA migration guide The write-set snippets use the vararg call shape planned for 1.13.0; the vararg overloads must land before the release ships these pages.
…e note code - One gold family across the site: the figure gradients, active chips, and link hovers all draw from #feeeb0 / #fbbf24 / #f59e0b (code-editor syntax tokens keep their own palette) - Center the benchmark matrix header row; data cells stay right-aligned - Inline code inside tutorial note boxes previously fell through to the Infima defaults and rendered as a light chip; it now uses the same dark chip as inline code elsewhere on the page
…minology - One rule, stated in the WriteSet javadoc, the reference docs, and both comparison pages: a write set writes the entities you name, plus the entities your values make necessary. An unsaved referenced entity is necessary (its dependent cannot be written without its key, and a row that does not exist cannot be a stale copy); a keyed referenced entity never is: it is the state hydrated when the value was read, and treating that snapshot as write intent would silently overwrite newer database state - update/upsert javadoc now state explicitly that a modified referenced entity is not written and that changed entities must be passed as explicit members - Rename the write-set operation terminology from verb to action across javadoc, KDoc, docs, tutorial pages, and the private Action enum in WriteSetImpl (write-set test suite passes: 25 tests)
Replace the inline reproduce-it sentence with the clone bar and "View on GitHub" button used on the example pages.
This was referenced Jul 15, 2026
zantvoort
added a commit
that referenced
this pull request
Jul 15, 2026
All seven actions accept entities as varargs next to the canonical Iterable forms: insert, insertAndFetch, update, updateAndFetch, upsert, upsertAndFetch and remove. The overloads are default methods delegating to the Iterable forms; Entity<?> is reifiable, so they are warning-free without @SafeVarargs. Single-entity and typed single-root overloads keep winning one-argument resolution in both Java and Kotlin, and an empty call is a no-op. The write-sets reference now shows the vararg shape where entities are enumerated inline, matching the comparison pages shipped in #272. Fixes #273
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/jpa-cascades-vs-write-sets.md, sidebar: Resources). Implements the same Owner-Pet-Visit graph in both models and explains the philosophy: cascades travel parent-to-child along mapped collections, write-set discovery follows foreign key fields upward, so insert discovery needs no configuration and delete discovery deliberately does not exist. Includes an action-by-action mapping (persist/merge/remove) and a cascade translation table. Cross-linked from the write-sets reference and the JPA migration guide./tutorials/object-graphs, added to the From JPA series with its hub card.WriteSetjavadoc, the write-sets reference, and both new pages: a write set writes the entities you name, plus the entities your values make necessary. A modified keyed entity held in a foreign key field is not written (a hydrated snapshot is not write intent); pass it as an explicit member.WriteSetImpl; the write-set test suite passes (25 tests).Notes
writeSet().insert(wolfie, rex, visit)), which does not exist onWriteSetyet; the vararg overloads need to land before the 1.13.0 release ships these pages.docs/-only and appear at/docs/nextuntil the next docs snapshot; the tutorial deploys with the site. Merging around the release keeps the tutorial's/docs/write-setslinks from going live before the target pages do.Verification
storm-corewrite-set tests pass after the terminology rename (25 tests).