bito-code-review[bot] commented on PR #16020:
URL: https://github.com/apache/grails-core/pull/16020#issuecomment-5018432623
<!-- Bito Reply -->
The change explicitly maps the 'text' type to `SqlTypes.LONG32VARCHAR` to
ensure consistent, unbounded behavior across different database dialects. By
bypassing the legacy `java.sql.Types.LONGVARCHAR` resolution, it avoids
dialect-specific fallback to bounded `VARCHAR` types when no explicit length is
defined. This approach is intended to provide a more predictable mapping to
native unbounded types (like `CLOB`, `LONGTEXT`, or `VARCHAR(MAX)`) as
supported by the underlying Hibernate 6 dialect registry.
**grails-data-hibernate7/core/src/main/groovy/org/grails/orm/hibernate/cfg/domainbinding/binder/SimpleValueBinder.java**
```
if (isUnboundedTextType(typeName) && simpleValue instanceof BasicValue
basicValue) {
basicValue.setExplicitJdbcTypeAccess(
typeConfiguration ->
typeConfiguration.getJdbcTypeRegistry().getDescriptor(SqlTypes.LONG32VARCHAR));
} else {
simpleValue.setTypeName(typeName);
}
```
--
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]