docs: correct schema-mode default to fail and document Java field finders#187
Merged
Merged
Conversation
…ders Schema validation defaults to `fail` in the Spring Boot starters and the Ktor plugin as of 1.12.0, but several docs still described the default as `none`. Align them with the shipped behavior (and with the canonical configuration.md#schema-validation section, which was already correct): - configuration.md: properties table, YAML/HOCON default examples, and the Production Hardening note. - spring-integration.md: schema-mode YAML default and surrounding prose. - validation.md: YAML comment, mode-table ordering, and properties table (also "Spring Boot only" -> "Spring Boot and Ktor"). - ktor-integration.md: schema-validation prose and mode table. Also document the 1.12 Java field-based finders in queries.md: findBy / findAllBy (single value and IN) and getBy now work on any Metamodel field, not just unique keys. The Java examples use them in place of the verbose select().where(...).getResultList() boilerplate.
Normally versioned_docs snapshots stay frozen, but the schema-mode default correction is a live-facing accuracy fix: /docs/* serves the 1.12.0 snapshot, so without this the wrong `none` default would remain live until the next release. Applying the same edits to version-1.12.0 as a deliberate one-time exception so the fix reaches the live site now. The snapshot files were byte-identical to the pre-edit docs/ sources, so these are exactly the same changes as the previous commit.
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
Follow-up to the 1.12.0 release. Two doc gaps surfaced when re-checking the adoption items against what actually shipped:
1. Schema-validation default is documented wrong. As of 1.12.0 schema validation defaults to
failin the Spring Boot starters and the Ktor plugin (StormAutoConfiguration.java:84,.kt:80, andStorm.kt:93all?: "fail", with tests asserting "validation must run in fail mode by default"). Several docs still said the default isnone, so a new adopter whose schema does not match would hit a boot failure the docs told them could not happen. Aligned every stale spot with the shipped behavior and with the canonicalconfiguration.md#schema-validationsection (which was already correct):configuration.md— properties table, YAML/HOCON default examples, and the Production Hardening note.spring-integration.md— schema-mode YAML default and prose.validation.md— YAML comment, mode-table ordering, and properties table (alsoSpring Boot only->Spring Boot and Ktor).ktor-integration.md— schema-validation prose and mode table.2. Java field-based finders were undocumented. 1.12 added
findBy/findAllBy/getBy(plusRefandfindRefBy/getRefByvariants) on the JavaEntityRepository, keyed on anyMetamodel<E, V>field rather than only unique keys (findAllBysupports single value,Ref, andIN-list).queries.mdonly showed the Kotlin/unique-key form. The Java examples now use these finders in place of the verboseselect().where(...).getResultList()boilerplate they replace.Note on visibility
Both
docs/(serves/docs/next) and the frozenversioned_docs/version-1.12.0/snapshot (serves the live/docs/*) are updated, so the schema-mode correction reaches the live site without waiting for a 1.12.1 release. Touching a versioned snapshot is a deliberate one-time exception to the normally-frozen rule, justified because this is a live-facing accuracy fix rather than new content. The snapshot files were byte-identical to the pre-editdocs/sources, so the two commits apply exactly the same changes.Verification
grepconfirms no remaining "default: none" / "skipped (default)" schema claims and no "Spring Boot only" forschema_modeindocs/or the snapshot.storm-java21/src/main/java/st/orm/repository/EntityRepository.java(@since 1.12).