HHH-4412 Corrected multiple test issues found in matrix CI

This commit is contained in:
Brett Meyer 2013-03-14 14:11:39 -04:00
parent c94870d9fd
commit 394b080a89
2 changed files with 7 additions and 3 deletions

View File

@ -37,7 +37,7 @@ import javax.persistence.Table;
@Table(name = "destination_entity")
@NamedNativeQueries({
@NamedNativeQuery(name = "DestinationEntity.insertSelect", query = "insert into destination_entity(id, from_id, fullNameFrom) "
+ " select fe.id, fe.id, concat(fe.name, fe.lastName) from from_entity fe where fe.id in (:ids)"),
+ " select fe.id, fe.id, fe.name||fe.lastName from from_entity fe where fe.id in (:ids)"),
@NamedNativeQuery(name = "DestinationEntity.insert", query = "insert into destination_entity(id, from_id, fullNameFrom) "
+ "values (:generatedId, :fromId, :fullName)"),
@NamedNativeQuery(name = "DestinationEntity.update", query = "update destination_entity set from_id=:idFrom, fullNameFrom=:fullName"

View File

@ -31,7 +31,9 @@ import java.util.List;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.testing.SkipForDialect;
import org.hibernate.testing.SkipForDialects;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
import org.junit.Test;
@ -151,8 +153,10 @@ public class NamedNativeQueryTest extends BaseCoreFunctionalTestCase {
}
@Test
@SkipForDialect( value = MySQLDialect.class,
comment = "MySQL appears to have trouble with fe.id selected twice in one statement")
@SkipForDialects( {
@SkipForDialect( value = MySQLDialect.class, comment = "MySQL appears to have trouble with fe.id selected twice in one statement"),
@SkipForDialect( value = SQLServerDialect.class, comment = "SQL Server does not support the || operator.")
} )
// TODO: Re-form DestinationEntity.insertSelect to something more supported?
public void testInsertMultipleValues() {
final String name = "Name";