Skip to content

Commit 394b080

Browse files
committed
HHH-4412 Corrected multiple test issues found in matrix CI
1 parent c94870d commit 394b080

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

hibernate-core/src/test/java/org/hibernate/test/jpa/ql/DestinationEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
@Table(name = "destination_entity")
3838
@NamedNativeQueries({
3939
@NamedNativeQuery(name = "DestinationEntity.insertSelect", query = "insert into destination_entity(id, from_id, fullNameFrom) "
40-
+ " select fe.id, fe.id, concat(fe.name, fe.lastName) from from_entity fe where fe.id in (:ids)"),
40+
+ " select fe.id, fe.id, fe.name||fe.lastName from from_entity fe where fe.id in (:ids)"),
4141
@NamedNativeQuery(name = "DestinationEntity.insert", query = "insert into destination_entity(id, from_id, fullNameFrom) "
4242
+ "values (:generatedId, :fromId, :fullName)"),
4343
@NamedNativeQuery(name = "DestinationEntity.update", query = "update destination_entity set from_id=:idFrom, fullNameFrom=:fullName"

hibernate-core/src/test/java/org/hibernate/test/jpa/ql/NamedNativeQueryTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
import org.hibernate.Query;
3232
import org.hibernate.Session;
3333
import org.hibernate.dialect.MySQLDialect;
34+
import org.hibernate.dialect.SQLServerDialect;
3435
import org.hibernate.testing.SkipForDialect;
36+
import org.hibernate.testing.SkipForDialects;
3537
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
3638
import org.junit.Test;
3739

@@ -151,8 +153,10 @@ public void testInsertSingleValue() {
151153
}
152154

153155
@Test
154-
@SkipForDialect( value = MySQLDialect.class,
155-
comment = "MySQL appears to have trouble with fe.id selected twice in one statement")
156+
@SkipForDialects( {
157+
@SkipForDialect( value = MySQLDialect.class, comment = "MySQL appears to have trouble with fe.id selected twice in one statement"),
158+
@SkipForDialect( value = SQLServerDialect.class, comment = "SQL Server does not support the || operator.")
159+
} )
156160
// TODO: Re-form DestinationEntity.insertSelect to something more supported?
157161
public void testInsertMultipleValues() {
158162
final String name = "Name";

0 commit comments

Comments
 (0)