File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
hibernate-core/src/test/java/org/hibernate/orm/test/mapping/basic
hibernate-testing/src/main/java/org/hibernate/testing/orm/junit Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1010import org .hibernate .annotations .Nationalized ;
1111import org .hibernate .orm .test .jpa .BaseEntityManagerFunctionalTestCase ;
1212
13+ import org .hibernate .testing .orm .junit .DialectFeatureChecks ;
14+ import org .hibernate .testing .orm .junit .RequiresDialectFeature ;
1315import org .junit .Test ;
1416
1517import static org .hibernate .testing .transaction .TransactionUtil .doInJPA ;
1820/**
1921 * @author Vlad Mihalcea
2022 */
23+ @ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsUnicodeNClob .class )
2124public class NationalizedTest extends BaseEntityManagerFunctionalTestCase {
2225
2326 @ Override
Original file line number Diff line number Diff line change 6666import org .hibernate .dialect .PostgreSQLDialect ;
6767import org .hibernate .dialect .SQLServerDialect ;
6868import org .hibernate .dialect .SpannerDialect ;
69+ import org .hibernate .dialect .SybaseASEDialect ;
6970import org .hibernate .dialect .SybaseDialect ;
7071import org .hibernate .dialect .SybaseDriverKind ;
7172import org .hibernate .dialect .TiDBDialect ;
@@ -1023,6 +1024,15 @@ public boolean apply(Dialect dialect) {
10231024 }
10241025 }
10251026
1027+ public static class SupportsUnicodeNClob implements DialectFeatureCheck {
1028+ @ Override
1029+ public boolean apply (Dialect dialect ) {
1030+ return !(dialect instanceof SybaseASEDialect aseDialect )
1031+ // The jconn driver apparently doesn't support unicode characters
1032+ || aseDialect .getDriverKind () == SybaseDriverKind .JTDS ;
1033+ }
1034+ }
1035+
10261036 private static final HashMap <Dialect , SqmFunctionRegistry > FUNCTION_REGISTRIES = new HashMap <>();
10271037
10281038 public static boolean definesFunction (Dialect dialect , String functionName ) {
You can’t perform that action at this time.
0 commit comments