HHH-13011 : Set hibernate.use_entity_where_clause_for_collections=true that assume that setting

This commit is contained in:
Gail Badner 2018-11-27 18:34:27 -08:00
parent d6f72a7d11
commit 9baba41bf5
6 changed files with 42 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.TeradataDialect;
@ -46,6 +47,12 @@ import static org.junit.Assert.fail;
* @author Emmanuel Bernard
*/
public class BasicHibernateAnnotationsTest extends BaseCoreFunctionalTestCase {
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( AvailableSettings.USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS, "true" );
}
@Override
protected boolean isCleanupTestDataRequired() {
return true;

View File

@ -25,6 +25,8 @@ import org.hibernate.Session;
import org.hibernate.annotations.Immutable;
import org.hibernate.annotations.Where;
import org.hibernate.annotations.WhereJoinTable;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -48,6 +50,11 @@ public class LazyManyToManyNonUniqueIdWhereTest extends BaseCoreFunctionalTestCa
return new Class[] { Material.class, Building.class, Rating.class, Size.class };
}
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( AvailableSettings.USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS, "true" );
}
@Before
public void setup() {
Session session = openSession();

View File

@ -22,6 +22,8 @@ import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.annotations.Immutable;
import org.hibernate.annotations.Where;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -45,6 +47,11 @@ public class LazyOneToManyNonUniqueIdWhereTest extends BaseCoreFunctionalTestCas
return new Class[] { Material.class, Building.class, Rating.class, Size.class };
}
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( AvailableSettings.USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS, "true" );
}
@Before
public void setup() {
Session session = openSession();

View File

@ -11,6 +11,8 @@ import java.util.Set;
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -32,6 +34,11 @@ public class LazyManyToManyNonUniqueIdNotFoundWhereTest extends BaseCoreFunction
return new String[] { "where/hbm/LazyManyToManyNonUniqueIdNotFoundWhereTest.hbm.xml" };
}
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( AvailableSettings.USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS, "true" );
}
@Before
public void setup() {
Session session = openSession();

View File

@ -14,6 +14,8 @@ import java.util.Set;
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -37,6 +39,11 @@ public class LazyManyToManyNonUniqueIdWhereTest extends BaseCoreFunctionalTestCa
return new String[] { "where/hbm/LazyManyToManyNonUniqueIdWhereTest.hbm.xml" };
}
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( AvailableSettings.USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS, "true" );
}
@Before
public void setup() {
Session session = openSession();

View File

@ -14,6 +14,8 @@ import java.util.Set;
import org.hibernate.Hibernate;
import org.hibernate.Session;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.testing.TestForIssue;
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
@ -37,6 +39,11 @@ public class LazyOneToManyNonUniqueIdWhereTest extends BaseCoreFunctionalTestCas
return new String[] { "where/hbm/LazyOneToManyNonUniqueIdWhereTest.hbm.xml" };
}
protected void configure(Configuration cfg) {
super.configure( cfg );
cfg.setProperty( AvailableSettings.USE_ENTITY_WHERE_CLAUSE_FOR_COLLECTIONS, "true" );
}
@Before
public void setup() {
Session session = openSession();