HHH-16031 @ManyToMany with @JoinTable(inverseColumn = ...) and SortedSet may results in data loss
This commit is contained in:
parent
241fe54d0a
commit
f4aec1cd0a
|
@ -404,13 +404,14 @@ public class AnnotatedJoinColumn extends AnnotatedColumn {
|
|||
PropertyData inferredData) {
|
||||
final AnnotatedJoinColumn column = new AnnotatedJoinColumn();
|
||||
column.setImplicit( true );
|
||||
column.setNullable( false ); //I break the spec, but it's for good
|
||||
|
||||
// column.setPropertyHolder( propertyHolder );
|
||||
// column.setPropertyName( getRelativePath( propertyHolder, propertyName ) );
|
||||
// column.setJoins( secondaryTables );
|
||||
// column.setContext( context );
|
||||
column.setParent( parent );
|
||||
column.bind();
|
||||
column.setNullable( false ); //I break the spec, but it's for good
|
||||
return column;
|
||||
}
|
||||
|
||||
|
@ -425,11 +426,11 @@ public class AnnotatedJoinColumn extends AnnotatedColumn {
|
|||
// column.setPropertyName( getRelativePath( propertyHolder, propertyName ) );
|
||||
// column.setJoins( secondaryTables );
|
||||
// column.setContext( context );
|
||||
column.setNullable( false ); //I break the spec, but it's for good
|
||||
//done after the annotation to override it
|
||||
column.setParent( parent );
|
||||
column.applyJoinAnnotation( joinColumn, inferredData.getPropertyName() );
|
||||
column.bind();
|
||||
column.setNullable( false ); //I break the spec, but it's for good
|
||||
return column;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import org.hibernate.orm.test.envers.Priority;
|
|||
import org.hibernate.orm.test.envers.entities.StrTestEntity;
|
||||
import org.hibernate.orm.test.envers.entities.manytomany.unidirectional.JoinTableEntity;
|
||||
|
||||
import org.hibernate.testing.FailureExpected;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -100,7 +99,6 @@ public class JoinTableDetachedTest extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpected( jiraKey = "HHH-15393", message = "Work for HHH-15393 (write-paths) causes a failure" )
|
||||
public void testRevisionsCounts() {
|
||||
Assert.assertEquals(
|
||||
Arrays.asList( 1, 2, 3, 4, 5 ), getAuditReader().getRevisions(
|
||||
|
@ -113,7 +111,6 @@ public class JoinTableDetachedTest extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpected( jiraKey = "HHH-15393", message = "Work for HHH-15393 (write-paths) causes a failure" )
|
||||
public void testHistoryOfCollectionEntity() {
|
||||
// Revision 1
|
||||
JoinTableEntity collectionEntity = new JoinTableEntity( collectionEntityId, "some data" );
|
||||
|
|
Loading…
Reference in New Issue