Skip to content

Commit 3deb8a5

Browse files
committed
Sybase also strips trailing spaces
Signed-off-by: Gavin King <[email protected]>
1 parent eb6f7a0 commit 3deb8a5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

hibernate-core/src/main/java/org/hibernate/dialect/Dialect.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ protected String columnType(int sqlTypeCode) {
582582
/**
583583
* Does this dialect strip trailing spaces from values stored
584584
* in columns of type {@code char(n)}?
585-
* MySQL is the main offender here.
585+
* MySQL and Sybase are the main offenders here.
586586
*/
587587
public boolean stripsTrailingSpacesFromChar() {
588588
return false;

hibernate-core/src/main/java/org/hibernate/dialect/SybaseDialect.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ public NationalizationSupport getNationalizationSupport() {
257257
return driverKind == SybaseDriverKind.JTDS ? NationalizationSupport.IMPLICIT : super.getNationalizationSupport();
258258
}
259259

260+
@Override
261+
public boolean stripsTrailingSpacesFromChar() {
262+
return true;
263+
}
264+
260265
@Override
261266
public void initializeFunctionRegistry(FunctionContributions functionContributions) {
262267
super.initializeFunctionRegistry( functionContributions );

0 commit comments

Comments
 (0)