Fix Oracle BOOLEAN compiler configuration docs - #3994
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Oracle BOOLEAN documentation to configure the Oracle dialect version via a JVM system property passed to the compiler process, avoiding use of the hyphenated dialect-options key as a direct javac -A annotation-processor option.
Changes:
- Gradle example now forks compilation and passes
-Dmicronaut.data.sql.dialect-options.oracle.version=23.1viaforkOptions.jvmArgs. - Maven example now enables compiler forking and passes the property via
-J-D...incompilerArgs.
Suppressed comments (1)
src/main/docs/guide/dbc/sqlMapping/sqlOracleBoolean.adoc:35
- Similarly for the Maven example: it now relies on a JVM system property passed via
-J-D...(and requires<fork>true</fork>). Adding a short explanatory sentence before the snippet would help connect it to the earlier discussion of processor options vs system properties.
[source,xml]
----
<fork>true</fork>
<compilerArgs>
<arg>-J-Dmicronaut.data.sql.dialect-options.oracle.version=23.1</arg>
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (3)
src/main/docs/guide/dbc/sqlMapping/sqlOracleBoolean.adoc:10
- The text implies Maven/Gradle must use a forked compiler JVM to pass this setting, but the only real requirement is that the system property is visible to the compiler process (forking is just one way to scope it per compilation). Rewording here avoids over-prescribing forking as mandatory.
The target is consumed by the annotation processor. In Maven and Gradle builds, pass it as a JVM system property to the forked Java compiler, as shown below.
src/main/docs/guide/dbc/sqlMapping/sqlOracleBoolean.adoc:33
- This paragraph reads as though Maven must always fork the compiler to use this setting, but that’s only true for the
-J-D...forwarding approach. Tightening the wording to indicate forking is required for-J(not for system properties in general) will be more accurate.
As with Gradle, Maven passes the value as a JVM system property to a forked Java compiler. The `-J` prefix forwards the `-D` property to that compiler JVM; `<fork>true</fork>` is required.
src/main/docs/guide/dbc/sqlMapping/sqlOracleBoolean.adoc:21
- "Forking is required" is overstated: forking is only required for this per-task
forkOptions.jvmArgsapproach. If the compiler runs in-process, the property can come from the Gradle daemon JVM instead. Consider narrowing the wording to explain that-Acannot be used and that forking is needed only to pass a per-task JVM arg.
The dialect-scoped key contains hyphens, so it is passed as a JVM system property to the forked Java compiler rather than as a direct `-A` annotation processor option. Forking is required for the compiler JVM to receive the property.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/main/docs/guide/dbc/sqlMapping/sqlOracleBoolean.adoc:11
- This section implies the dialect target must be passed as a JVM system property, but the codebase defines
SqlDialectOptions.DIALECT_OPTIONS_CONFIGURATION_PREFIXas an annotation-processor option prefix (data-model/.../SqlDialectOptions.java), and other docs describe these build-time settings as usable viajavac -Awith-Das a fallback. Suggest documenting both forms explicitly and keeping the precedence statement consistent.
To generate Oracle 23.1-compatible SQL for Oracle repositories, keep using api:data.model.query.builder.sql.Dialect#ORACLE[] and set the build-time dialect target `micronaut.data.sql.dialect-options.oracle.version=23.1`.
The target is consumed by the annotation processor. Make the value available as a JVM system property to the compiler process. The examples below use compiler forking to scope the property to compilation, but forking is not required when the property is already present in the compiler JVM.
If both processor-context configuration and the JVM system property are available, processor-context configuration takes precedence.
src/main/docs/guide/dbc/sqlMapping/sqlOracleBoolean.adoc:21
- The statement that the key "contains hyphens" and therefore cannot be passed as a
-Aprocessor option is misleading: the project treats this prefix as an annotation-processor option key (seeSqlDialectOptions.DIALECT_OPTIONS_CONFIGURATION_PREFIX). If the intent is to document a Gradle-specific limitation/workaround, consider wording this as an optional fallback rather than a generaljavac -Arestriction.
The dialect-scoped key contains hyphens, so it cannot be passed directly as a `-A` annotation processor option. This example uses a per-task JVM argument, which requires a forked compiler; alternatively, the property can be supplied to the Gradle daemon JVM.
|



Update Maven and Gradle examples to pass the dialect-version property to the forked compiler JVM, since the hyphenated option cannot be used directly as a
javac -Aprocessor option.