HHH-7742: Modified o.h.metamodel.internal.source.hbm.Helper.interpretCascadeStyles() to split the string on both commas and spaces. Might be more to the original intention to split on a pattern of a comma followed by any amount of spaces.
This commit is contained in:
parent
4dfbe673c1
commit
4c22d9347f
|
@ -196,7 +196,7 @@ public class Helper {
|
|||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Qualify a (supposed class) name with the unqualified-class package name if it is not already qualified
|
||||
*
|
||||
|
@ -252,7 +252,7 @@ public class Helper {
|
|||
if ( StringHelper.isEmpty( cascades ) ) {
|
||||
cascades = bindingContext.getMappingDefaults().getCascadeStyle();
|
||||
}
|
||||
for ( String cascade : StringHelper.split( ",", cascades ) ) {
|
||||
for ( String cascade : StringHelper.split( " ,", cascades ) ) {
|
||||
cascadeStyles.add( CascadeStyles.getCascadeStyle( cascade ) );
|
||||
}
|
||||
return cascadeStyles;
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.junit.Test;
|
|||
import org.hibernate.Session;
|
||||
import org.hibernate.Transaction;
|
||||
import org.hibernate.jdbc.Work;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
@ -43,7 +42,6 @@ import static org.junit.Assert.assertEquals;
|
|||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class RefreshTest extends BaseCoreFunctionalTestCase {
|
||||
@Override
|
||||
public String[] getMappings() {
|
||||
|
|
|
@ -6,7 +6,6 @@ import org.hibernate.Session;
|
|||
import org.hibernate.cfg.Configuration;
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.testing.DialectChecks;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.RequiresDialectFeature;
|
||||
import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase;
|
||||
|
||||
|
@ -18,7 +17,6 @@ import static org.junit.Assert.assertNull;
|
|||
* @author Steve Ebersole
|
||||
*/
|
||||
@RequiresDialectFeature( DialectChecks.SupportsIdentityColumns.class )
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class IdentityGeneratedKeysTest extends BaseCoreFunctionalTestCase {
|
||||
@Override
|
||||
public void configure(Configuration cfg) {
|
||||
|
|
|
@ -27,15 +27,12 @@ import org.junit.Test;
|
|||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.test.jpa.AbstractJPATest;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class MutableNaturalIdTest extends AbstractJPATest {
|
||||
@Override
|
||||
protected Class<?>[] getAnnotatedClasses() {
|
||||
|
|
|
@ -27,14 +27,12 @@ import org.junit.Test;
|
|||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.test.jpa.AbstractJPATest;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
/**
|
||||
* Test use of the JPA 2.1 FUNCTION keyword.
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class FunctionKeywordTest extends AbstractJPATest {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -27,14 +27,12 @@ import org.junit.Test;
|
|||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.test.jpa.AbstractJPATest;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
/**
|
||||
* Tests for various JPAQL compliance issues
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class JPAQLComplianceTest extends AbstractJPATest {
|
||||
@Test
|
||||
public void testAliasNameSameAsUnqualifiedEntityName() {
|
||||
|
|
|
@ -27,12 +27,10 @@ import org.junit.Test;
|
|||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.test.jpa.AbstractJPATest;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class NativeQueryTest extends AbstractJPATest {
|
||||
@Test
|
||||
public void testJpaStylePositionalParametersInNativeSql() {
|
||||
|
|
|
@ -29,14 +29,12 @@ import org.junit.Test;
|
|||
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.test.jpa.AbstractJPATest;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
/**
|
||||
* Tests of the JPA decision (ugh) to use ON as a keyword for what Hibernate/HQL termed WITH.
|
||||
*
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class OnKeywordTest extends AbstractJPATest {
|
||||
@Test
|
||||
public void basicTest() {
|
||||
|
|
|
@ -31,8 +31,6 @@ import org.hibernate.Session;
|
|||
import org.hibernate.test.jpa.AbstractJPATest;
|
||||
import org.hibernate.test.jpa.Item;
|
||||
import org.hibernate.test.jpa.Part;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
@ -42,7 +40,6 @@ import static org.junit.Assert.assertTrue;
|
|||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class RemovedEntityTest extends AbstractJPATest {
|
||||
@Test
|
||||
public void testRemoveThenContains() {
|
||||
|
|
|
@ -33,7 +33,6 @@ import org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory;
|
|||
import org.hibernate.engine.transaction.internal.jta.JtaStatusHelper;
|
||||
import org.hibernate.engine.transaction.spi.TransactionImplementor;
|
||||
import org.hibernate.test.jpa.AbstractJPATest;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.jta.TestingJtaBootstrap;
|
||||
import org.hibernate.testing.jta.TestingJtaPlatformImpl;
|
||||
|
||||
|
@ -43,7 +42,6 @@ import static org.junit.Assert.assertTrue;
|
|||
/**
|
||||
* @author Steve Ebersole
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class TransactionJoiningTest extends AbstractJPATest {
|
||||
@Override
|
||||
public void configure(Configuration cfg) {
|
||||
|
|
|
@ -25,14 +25,12 @@ package org.hibernate.test.manytomanyassociationclass.surrogateid.assigned;
|
|||
|
||||
import org.hibernate.test.manytomanyassociationclass.AbstractManyToManyAssociationClassTest;
|
||||
import org.hibernate.test.manytomanyassociationclass.Membership;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
/**
|
||||
* Tests on many-to-many association using an association class with a surrogate ID that is assigned.
|
||||
*
|
||||
* @author Gail Badner
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class ManyToManyAssociationClassAssignedIdTest extends AbstractManyToManyAssociationClassTest {
|
||||
@Override
|
||||
public String[] getMappings() {
|
||||
|
|
|
@ -39,7 +39,6 @@ import static org.junit.Assert.fail;
|
|||
*
|
||||
* @author Gail Badner
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public class ManyToManyAssociationClassGeneratedIdTest extends AbstractManyToManyAssociationClassTest {
|
||||
@Override
|
||||
public String[] getMappings() {
|
||||
|
@ -53,6 +52,7 @@ public class ManyToManyAssociationClassGeneratedIdTest extends AbstractManyToMan
|
|||
|
||||
@Override
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public void testRemoveAndAddEqualElement() {
|
||||
deleteMembership( getUser(), getGroup(), getMembership() );
|
||||
addMembership( getUser(), getGroup(), createMembership( "membership" ) );
|
||||
|
@ -80,10 +80,11 @@ public class ManyToManyAssociationClassGeneratedIdTest extends AbstractManyToMan
|
|||
|
||||
@Override
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public void testRemoveAndAddEqualCollection() {
|
||||
deleteMembership( getUser(), getGroup(), getMembership() );
|
||||
getUser().setMemberships( new HashSet() );
|
||||
getGroup().setMemberships( new HashSet() );
|
||||
getUser().setMemberships( new HashSet< Membership >() );
|
||||
getGroup().setMemberships( new HashSet< Membership >() );
|
||||
addMembership( getUser(), getGroup(), createMembership( "membership" ) );
|
||||
|
||||
Session s = openSession();
|
||||
|
@ -109,6 +110,7 @@ public class ManyToManyAssociationClassGeneratedIdTest extends AbstractManyToMan
|
|||
|
||||
@Override
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel
|
||||
public void testRemoveAndAddEqualElementNonKeyModified() {
|
||||
deleteMembership( getUser(), getGroup(), getMembership() );
|
||||
Membership membershipNew = createMembership( "membership" );
|
||||
|
|
Loading…
Reference in New Issue