From f89e82a020202604d168fdd893b7e7be6b8b50d2 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Tue, 17 Apr 2018 06:43:20 -0500 Subject: [PATCH] HHH-8944 - ColumnTransformer handling is too aggressive in qualifying "column names" Limited to H2 because getting a good expression to use for `Staff#kooky` that works on all databases is challenging and really what happens on the "database side" here is not relevant - the issue being tested is how Hibernate applies the table aliases to column references in the expression. --- .../ColumnTransformerTest.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/various/readwriteexpression/ColumnTransformerTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/various/readwriteexpression/ColumnTransformerTest.java index 34776ddb61..85b4a84e56 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/various/readwriteexpression/ColumnTransformerTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/various/readwriteexpression/ColumnTransformerTest.java @@ -6,15 +6,14 @@ */ package org.hibernate.test.annotations.various.readwriteexpression; -import org.junit.Test; - import org.hibernate.Session; import org.hibernate.Transaction; import org.hibernate.criterion.Restrictions; -import org.hibernate.dialect.MariaDBDialect; +import org.hibernate.dialect.H2Dialect; -import org.hibernate.testing.SkipForDialect; +import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; +import org.junit.Test; import static org.junit.Assert.assertEquals; @@ -22,8 +21,15 @@ import static org.junit.Assert.assertEquals; * @author Emmanuel Bernard */ public class ColumnTransformerTest extends BaseCoreFunctionalTestCase { + /** + * @implNote Limited to H2 because getting a good expression to use for + * {@link Staff#kooky} that works on all databases is challenging and + * really what happens on the "database side" here is not relevant - + * the issue being tested is how Hibernate applies the table aliases to + * column references in the expression. + */ @Test - @SkipForDialect( MariaDBDialect.class ) + @RequiresDialect(H2Dialect.class ) public void testCustomColumnReadAndWrite() throws Exception{ Session s = openSession(); Transaction t = s.beginTransaction();