borinquenkid commented on PR #16020:
URL: https://github.com/apache/grails-core/pull/16020#issuecomment-5028963773

   @jdaugherty Thanks for the review — implemented your suggested direction in 
3c0350d1b9 → a8f50312ea.
   
   **Mechanism swap:** dropped 
`setExplicitJdbcTypeAccess(SqlTypes.LONG32VARCHAR)` entirely. `type: 'text'` 
now resolves through the normal `setTypeName`/named-type path exactly as before 
(no longer skipped), and when no explicit length is configured, we set 
`column.setLength(Length.LONG32)` and let each dialect's own capacity-dependent 
`DdlTypeRegistry` pick the native unbounded type — `text` on Postgres, 
`longtext` on MySQL/MariaDB, `CLOB` on H2/Oracle. No JDBC type is forced onto 
the column regardless of its underlying Java type.
   
   **Composability:** confirmed `maxSize`/`inList`/explicit `column length:` 
all still take priority and keep the column bounded — added a test for exactly 
the `type: 'text'` + `maxSize` combination you flagged.
   
   **Where the logic lives:** moved the length decision into 
`StringColumnConstraintsBinder` (which already owned `maxSize`/`inList` length 
computation) rather than `SimpleValueBinder` reaching into `Column` after the 
fact — `SimpleValueBinder` just resolves and forwards the type name now, no 
`Length`/`Column` API surface on it at all.
   
   **Test coverage**, per your ask:
   - New `GormTextTypeColumnLengthSpec` — H2, no Testcontainers/Docker 
requirement, so container-less CI now exercises this path (previously only the 
Postgres Testcontainers spec did).
   - Extended `GormTextTypeColumnIntegrationSpec` to a Postgres/MySQL/MariaDB 
matrix (Oracle excluded, matching the existing `RLikeHibernate7Spec` precedent 
for Oracle Testcontainers flakiness). Reverting the fix locally confirmed 
MySQL/MariaDB were independently broken too (`TEXT` capped at 65535, not just 
Postgres's 32600) — real regression coverage, not just Postgres.
   
   One thing from your comment I did *not* implement: the broader idea of a 
first-class "unset length = unbounded" knob usable by any string type, not just 
`type: 'text'`. Kept this PR scoped to the reported bug; happy to open a 
follow-up if that's wanted.
   
   Full `grails-data-hibernate7-core` suite: 3020 tests, 0 failures. 
`codeStyle` clean.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to