HHH-7490 : Misc bugfixes and added @FailureExpectedWithNewMetamodel to failing tests
This commit is contained in:
parent
651b23b173
commit
9bd6917d0d
|
@ -175,6 +175,7 @@ import org.hibernate.type.ForeignKeyDirection;
|
|||
import org.hibernate.type.Type;
|
||||
|
||||
import org.jboss.jandex.DotName;
|
||||
import org.jboss.logging.Logger;
|
||||
|
||||
import static org.hibernate.MultiTenancyStrategy.DISCRIMINATOR;
|
||||
import static org.hibernate.engine.spi.SyntheticAttributeHelper.SYNTHETIC_COMPOSITE_ID_ATTRIBUTE_NAME;
|
||||
|
@ -189,6 +190,8 @@ import static org.hibernate.engine.spi.SyntheticAttributeHelper.SYNTHETIC_COMPOS
|
|||
* @author Strong Liu
|
||||
*/
|
||||
public class Binder {
|
||||
private static final Logger LOG = Logger.getLogger( Binder.class );
|
||||
|
||||
// Entity hierarchies and source index need be available throughout the binding process
|
||||
private final Map<String, EntityHierarchySource> entityHierarchiesByRootEntityName =
|
||||
new LinkedHashMap<String, EntityHierarchySource>();
|
||||
|
@ -1059,6 +1062,12 @@ public class Binder {
|
|||
// processing entity hierarchies.
|
||||
int oldSize = Integer.MAX_VALUE;
|
||||
while( !unresolvedEntityHierarchies.isEmpty() && unresolvedEntityHierarchies.size() < oldSize ) {
|
||||
LOG.debug(
|
||||
String.format(
|
||||
"Retry resolving remaining unresolved EntityHieraries: %s",
|
||||
getRootEntityNames( unresolvedEntityHierarchies )
|
||||
)
|
||||
);
|
||||
oldSize = unresolvedEntityHierarchies.size();
|
||||
for ( Iterator<EntityHierarchySource> it = unresolvedEntityHierarchies.iterator(); it.hasNext(); ) {
|
||||
final EntityHierarchySource entityHierarchySource = it.next();
|
||||
|
@ -1066,26 +1075,44 @@ public class Binder {
|
|||
processHelper.apply( entityHierarchySource, strategy );
|
||||
// succeeded, so the entityHierarchySource is no longer unresolved.
|
||||
it.remove();
|
||||
LOG.debug(
|
||||
String.format(
|
||||
"EntityHierarchy [%s] has been resolved", entityHierarchySource.getRoot().getEntityName()
|
||||
)
|
||||
);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
// to nothing;
|
||||
// just log the exception.
|
||||
LOG.debug(
|
||||
String.format(
|
||||
"Could not resolve EntityHierarchy %s due to: [%s]",
|
||||
entityHierarchySource.getRoot().getEntityName(),
|
||||
ex
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// If any entity hierarchies cannot be resolved, then throw exception.
|
||||
if ( ! unresolvedEntityHierarchies.isEmpty() ) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
String sep = "";
|
||||
for ( EntityHierarchySource unresolved : unresolvedEntityHierarchies ) {
|
||||
buffer.append( sep ).append( unresolved.getRoot().getEntityName() );
|
||||
sep = ", ";
|
||||
}
|
||||
throw new IllegalStateException(
|
||||
"Could not resolve all EntityHierarchies; remaining = {" + buffer.toString() + "}"
|
||||
"Could not resolve all EntityHierarchies; remaining = {" +
|
||||
getRootEntityNames( unresolvedEntityHierarchies ) +
|
||||
"}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private String getRootEntityNames(Set<EntityHierarchySource> entityHierarchySources) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
String sep = "";
|
||||
for ( EntityHierarchySource entityHierarchySource : entityHierarchySources ) {
|
||||
buffer.append( sep ).append( entityHierarchySource.getRoot().getEntityName() );
|
||||
sep = ", ";
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
// TODO: this will not be necessary once we know the proper order for
|
||||
// processing entity hierarchies.
|
||||
private boolean isIdentifierDependentOnOtherEntityHierarchy(EntityHierarchySource entityHierarchySource) {
|
||||
|
|
|
@ -30,6 +30,7 @@ import java.util.List;
|
|||
import org.hibernate.TruthValue;
|
||||
import org.hibernate.cfg.NamingStrategy;
|
||||
import org.hibernate.internal.util.StringHelper;
|
||||
import org.hibernate.metamodel.source.internal.annotations.attribute.SingularAssociationAttribute;
|
||||
import org.hibernate.metamodel.source.spi.ColumnSource;
|
||||
import org.hibernate.metamodel.source.spi.DerivedValueSource;
|
||||
import org.hibernate.metamodel.source.spi.RelationalValueSource;
|
||||
|
@ -93,7 +94,8 @@ public class RelationalValueBindingHelper {
|
|||
final boolean forceNonNullable) {
|
||||
final List<RelationalValueBinding> valueBindings = new ArrayList<RelationalValueBinding>();
|
||||
final NaturalIdMutability naturalIdMutability;
|
||||
if ( SingularAttributeSource.class.isInstance( valueSourceContainer ) ) {
|
||||
if ( SingularAttributeSource.class.isInstance( valueSourceContainer ) &&
|
||||
SingularAttributeSource.class.cast( valueSourceContainer ).getNaturalIdMutability() != null ) {
|
||||
naturalIdMutability = SingularAttributeSource.class.cast( valueSourceContainer ).getNaturalIdMutability();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -124,7 +124,9 @@ public abstract class AbstractToOneAttributeSourceImpl extends SingularAttribute
|
|||
|
||||
@Override
|
||||
public ForeignKeyDirection getForeignKeyDirection() {
|
||||
return singularAttributeNature == SingularAttributeNature.ONE_TO_ONE && !associationAttribute.isOptional()
|
||||
return singularAttributeNature == SingularAttributeNature.ONE_TO_ONE &&
|
||||
!associationAttribute.isOptional() &&
|
||||
associationAttribute.getMappedByAttributeName() == null
|
||||
? ForeignKeyDirection.FROM_PARENT
|
||||
: ForeignKeyDirection.TO_PARENT;
|
||||
}
|
||||
|
|
|
@ -176,12 +176,12 @@ public class PluralAttributeElementDetailsEmbedded implements PluralAttributeEle
|
|||
|
||||
@Override
|
||||
public boolean getContainerUpdatability() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getContainerInsertability() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -104,12 +104,12 @@ public class PluralAttributeIndexDetailsMapKeyEmbedded
|
|||
|
||||
@Override
|
||||
public boolean getContainerUpdatability() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getContainerInsertability() {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -293,6 +293,7 @@ public class RevisionInfoConfiguration {
|
|||
HibernateTypeDescriptor revisionTimestampType = revisionTimestampAttribute.getHibernateTypeDescriptor();
|
||||
final String revisionTimestampClassName = revisionTimestampType.getJavaTypeDescriptor().getName().toString();
|
||||
if ( Long.TYPE.getName().equals( revisionTimestampClassName ) ||
|
||||
Long.class.getName().equals( revisionTimestampClassName ) ||
|
||||
java.util.Date.class.getName().equals( revisionTimestampClassName ) ||
|
||||
Date.class.getName().equals( revisionTimestampClassName) ) {
|
||||
revisionInfoTimestampData = new PropertyData(
|
||||
|
|
|
@ -30,6 +30,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.hibernate.MappingException;
|
||||
import org.hibernate.cfg.NotYetImplementedException;
|
||||
import org.hibernate.envers.RelationTargetAuditMode;
|
||||
import org.hibernate.envers.configuration.internal.metadata.reader.ClassAuditingData;
|
||||
import org.hibernate.envers.configuration.internal.metadata.reader.PropertyAuditingData;
|
||||
|
@ -294,7 +295,9 @@ public final class AuditMetadataGenerator {
|
|||
}
|
||||
else if ( type instanceof OneToOneType ) {
|
||||
final OneToOneAttributeBinding oneToOneAttributeBinding = (OneToOneAttributeBinding) attributeBinding;
|
||||
if ( oneToOneAttributeBinding.getReferencedAttributeBinding().getAttribute().getName() != null ) {
|
||||
if ( oneToOneAttributeBinding.getReferencedAttributeBinding().getAttribute().getName() != null &&
|
||||
!oneToOneAttributeBinding.getReferencedEntityBinding().getHierarchyDetails().getEntityIdentifier()
|
||||
.isIdentifierAttributeBinding( oneToOneAttributeBinding.getReferencedAttributeBinding() ) ) {
|
||||
toOneRelationMetadataGenerator.addOneToOneNotOwning(
|
||||
propertyAuditingData,
|
||||
oneToOneAttributeBinding,
|
||||
|
@ -715,6 +718,10 @@ public final class AuditMetadataGenerator {
|
|||
);
|
||||
|
||||
// TODO: add support for joins
|
||||
if ( !entityBinding.getSecondaryTables().isEmpty() ) {
|
||||
throw new NotYetImplementedException( "Secondary tables are not supported by envers yet." );
|
||||
}
|
||||
|
||||
// Creating and mapping joins (first pass)
|
||||
//createJoins( entityBinding, classMapping, auditingData );
|
||||
//addJoins( entityBinding, propertyMapper, auditingData, entityBinding.getEntityName(), xmlMappingData, true );
|
||||
|
|
|
@ -57,6 +57,7 @@ import org.hibernate.metamodel.spi.binding.EmbeddedAttributeBinding;
|
|||
import org.hibernate.metamodel.spi.binding.EntityBinding;
|
||||
import org.hibernate.metamodel.spi.domain.Attribute;
|
||||
import org.hibernate.metamodel.spi.domain.Hierarchical;
|
||||
import org.hibernate.metamodel.spi.domain.MappedSuperclass;
|
||||
|
||||
import org.jboss.jandex.AnnotationInstance;
|
||||
import org.jboss.jandex.ClassInfo;
|
||||
|
@ -398,7 +399,12 @@ public class AuditedPropertiesReader {
|
|||
addFromProperties( getAttributeBindings( attributeBindingContainer, "property" ), "property", propertyAccessedPersistentProperties, allClassAudited );
|
||||
|
||||
if ( allClassAudited != null || !auditedPropertiesHolder.isEmpty() ) {
|
||||
if ( EntityBinding.class.isInstance( attributeBindingContainer ) ) {
|
||||
if ( Hierarchical.class.isInstance( attributeBindingContainer.getAttributeContainer() ) ) {
|
||||
final Hierarchical hierarchical = (Hierarchical) attributeBindingContainer.getAttributeContainer();
|
||||
if ( MappedSuperclass.class.isInstance( hierarchical.getSuperType() ) ) {
|
||||
throw new NotYetImplementedException( "@MappedSuperclass not supported with new metamodel by envers yet. " );
|
||||
}
|
||||
else if ( EntityBinding.class.isInstance( attributeBindingContainer ) ) {
|
||||
final EntityBinding entityBinding = (EntityBinding) attributeBindingContainer;
|
||||
if ( entityBinding.getSuperEntityBinding() != null ) {
|
||||
addPropertiesFromClass( entityBinding.getSuperEntityBinding() );
|
||||
|
@ -406,6 +412,7 @@ public class AuditedPropertiesReader {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addFromProperties(
|
||||
Iterable<AttributeBinding> attributes,
|
||||
|
|
|
@ -121,7 +121,7 @@ public abstract class Tools {
|
|||
else {
|
||||
throw new AssertionFailure( "Unexpected annotation target " + target.toString() );
|
||||
}
|
||||
return enclosingClass.equals( clazz ) || jandexIndex.getAllKnownSubclasses( clazz.name() ).contains( enclosingClass );
|
||||
return enclosingClass.equals( clazz ) || jandexIndex.getAllKnownSubclasses( enclosingClass.name() ).contains( clazz );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import java.util.Map;
|
|||
import org.jboss.logging.Logger;
|
||||
|
||||
import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl;
|
||||
import org.hibernate.cfg.Configuration;
|
||||
import org.hibernate.dialect.Dialect;
|
||||
import org.hibernate.dialect.H2Dialect;
|
||||
import org.hibernate.engine.transaction.internal.jta.JtaStatusHelper;
|
||||
|
|
|
@ -77,7 +77,6 @@ public class Component4 {
|
|||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((description == null) ? 0 : description.hashCode());
|
||||
result = prime * result + ((key == null) ? 0 : key.hashCode());
|
||||
result = prime * result + ((value == null) ? 0 : value.hashCode());
|
||||
return result;
|
||||
|
@ -94,9 +93,6 @@ public class Component4 {
|
|||
|
||||
Component4 other = (Component4) obj;
|
||||
|
||||
if ( description != null ? !description.equals( other.description ) : other.description != null ) {
|
||||
return false;
|
||||
}
|
||||
if ( key != null ? !key.equals( other.key ) : other.key != null ) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -28,12 +28,14 @@ import java.util.Arrays;
|
|||
|
||||
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
||||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Building SessionFactory for envers with LenientPersistentAttributeMemberResolver.INSTANCE is not supported yet.")
|
||||
public class MixedAccessType extends BaseEnversJPAFunctionalTestCase {
|
||||
private Integer id1;
|
||||
|
||||
|
|
|
@ -25,9 +25,12 @@ package org.hibernate.envers.test.integration.basic;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.hibernate.cfg.Environment;
|
||||
import org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory;
|
||||
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
||||
/**
|
||||
|
@ -40,4 +43,16 @@ public class ClassicQueryTranslatorFactoryTest extends Simple {
|
|||
super.addConfigOptions( options );
|
||||
options.put( Environment.QUERY_TRANSLATOR, ClassicQueryTranslatorFactory.class.getName() );
|
||||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "ClassicQueryTranslatorFactoryTest confuses package name with an alias" )
|
||||
public void testHistoryOfId1() {
|
||||
super.testHistoryOfId1();
|
||||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "ClassicQueryTranslatorFactoryTest confuses package name with an alias" )
|
||||
public void testRevisionsCounts() {
|
||||
super.testRevisionsCounts();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.hibernate.envers.test.tools.TestTools;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
||||
/**
|
||||
|
@ -114,6 +115,7 @@ public class EnumSet extends BaseEnversJPAFunctionalTestCase {
|
|||
|
||||
@Test
|
||||
@TestForIssue(jiraKey = "HHH-7780")
|
||||
@FailureExpectedWithNewMetamodel( message = "Enum attributes represented by String not supported yet." )
|
||||
public void testEnumRepresentation() {
|
||||
EntityManager entityManager = getEntityManager();
|
||||
List<Object> enums1 = entityManager.createNativeQuery(
|
||||
|
|
|
@ -50,7 +50,7 @@ public class CollectionOfComponents extends BaseEnversJPAFunctionalTestCase {
|
|||
|
||||
@Override
|
||||
protected Class<?>[] getAnnotatedClasses() {
|
||||
return new Class[] {ComponentSetTestEntity.class};
|
||||
return new Class[] {ComponentSetTestEntity.class, Component1.class };
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -9,12 +9,14 @@ import java.util.List;
|
|||
import org.hibernate.MappingException;
|
||||
import org.hibernate.envers.test.AbstractOneSessionTest;
|
||||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Hernán Chanfreau
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "hbm.xml source not supported because it is not indexed." )
|
||||
public class ReadEntityWithAuditedCollectionTest extends AbstractOneSessionTest {
|
||||
|
||||
private long id_car1;
|
||||
|
|
|
@ -35,12 +35,14 @@ import org.hibernate.envers.test.entities.ids.EmbIdWithCustomType;
|
|||
import org.hibernate.envers.test.entities.ids.EmbIdWithCustomTypeTestEntity;
|
||||
import org.hibernate.envers.test.entities.ids.MulId;
|
||||
import org.hibernate.envers.test.entities.ids.MulIdTestEntity;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Custom types not supported by envers yet." )
|
||||
public class CompositeIds extends BaseEnversJPAFunctionalTestCase {
|
||||
private EmbId id1;
|
||||
private EmbId id2;
|
||||
|
|
|
@ -9,12 +9,14 @@ import org.hibernate.envers.test.Priority;
|
|||
import org.junit.Test;
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
||||
/**
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@TestForIssue(jiraKey = "HHH-4751")
|
||||
@FailureExpectedWithNewMetamodel( message = "@IdClass with association not supported yet.")
|
||||
public class IdClassWithRelationTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private RelationalClassId entityId = null;
|
||||
private String typeId = null;
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
|||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.envers.test.integration.inheritance.joined.ParentEntity;
|
||||
import org.hibernate.metamodel.spi.relational.Column;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -98,6 +99,7 @@ public class ChildPrimaryKeyJoinAuditing extends BaseEnversJPAFunctionalTestCase
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@PrimaryKeyJoinColumn does not work on sub-entity." )
|
||||
public void testChildIdColumnName() {
|
||||
Assert.assertEquals(
|
||||
"other_id",
|
||||
|
|
|
@ -10,6 +10,7 @@ import org.hibernate.envers.test.integration.inheritance.mixed.entities.Activity
|
|||
import org.hibernate.envers.test.integration.inheritance.mixed.entities.ActivityId;
|
||||
import org.hibernate.envers.test.integration.inheritance.mixed.entities.CheckInActivity;
|
||||
import org.hibernate.envers.test.integration.inheritance.mixed.entities.NormalActivity;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -18,6 +19,7 @@ import static org.junit.Assert.assertEquals;
|
|||
/**
|
||||
* @author Michal Skowronek (mskowr at o2 pl)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Secondary tables are not supported by envers yet.")
|
||||
public class MixedInheritanceStrategiesEntityTest extends BaseEnversJPAFunctionalTestCase {
|
||||
|
||||
private ActivityId id2;
|
||||
|
|
|
@ -92,7 +92,6 @@ public class DiscriminatorFormulaTest extends BaseEnversJPAFunctionalTestCase {
|
|||
assert entityDiscriminator.getRelationalValue().getValueType() == Value.ValueType.DERIVED_VALUE;
|
||||
DerivedValue derivedValue = (DerivedValue) entityDiscriminator.getRelationalValue();
|
||||
Assert.assertEquals( ParentEntity.DISCRIMINATOR_QUERY, derivedValue.getExpression() );
|
||||
assert false;
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -42,7 +42,8 @@ public class AuditedAbstractParentTest extends BaseEnversJPAFunctionalTestCase {
|
|||
for ( Schema schema : getMetadata().getDatabase().getSchemas() ) {
|
||||
for ( TableSpecification table : schema.getTables() ) {
|
||||
if ( "AbstractEntity_AUD".equals( table.getLogicalName().getText() ) ) {
|
||||
Assert.assertFalse( Table.class.isInstance( table ) );
|
||||
Assert.assertTrue( Table.class.isInstance( table ) );
|
||||
Assert.assertFalse( Table.class.cast( table ).isPhysicalTable() );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hibernate.envers.test.Priority;
|
|||
import org.hibernate.envers.test.entities.IntNoAutoIdTestEntity;
|
||||
import org.hibernate.envers.test.entities.manytomany.WhereJoinTableEntity;
|
||||
import org.hibernate.envers.test.tools.TestTools;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -140,6 +141,7 @@ public class BasicWhereJoinTable extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfWjte1() {
|
||||
IntNoAutoIdTestEntity ite1_1 = getEntityManager().find( IntNoAutoIdTestEntity.class, ite1_1_id );
|
||||
IntNoAutoIdTestEntity ite2_1 = getEntityManager().find( IntNoAutoIdTestEntity.class, ite2_1_id );
|
||||
|
@ -163,6 +165,7 @@ public class BasicWhereJoinTable extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfWjte2() {
|
||||
IntNoAutoIdTestEntity ite1_1 = getEntityManager().find( IntNoAutoIdTestEntity.class, ite1_1_id );
|
||||
IntNoAutoIdTestEntity ite1_2 = getEntityManager().find( IntNoAutoIdTestEntity.class, ite1_2_id );
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hibernate.envers.test.Priority;
|
|||
import org.hibernate.envers.test.entities.manytomany.biowned.ListBiowning1Entity;
|
||||
import org.hibernate.envers.test.entities.manytomany.biowned.ListBiowning2Entity;
|
||||
import org.hibernate.envers.test.tools.TestTools;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -153,6 +154,7 @@ public class BasicBiowned extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "Revision query is wrong for bidirectional many-to-many when both sides are owners." )
|
||||
public void testHistoryOfO1_1() {
|
||||
ListBiowning2Entity o2_1 = getEntityManager().find( ListBiowning2Entity.class, o2_1_id );
|
||||
ListBiowning2Entity o2_2 = getEntityManager().find( ListBiowning2Entity.class, o2_2_id );
|
||||
|
@ -171,6 +173,7 @@ public class BasicBiowned extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "Revision query is wrong for bidirectional many-to-many when both sides are owners." )
|
||||
public void testHistoryOfO1_2() {
|
||||
ListBiowning2Entity o2_1 = getEntityManager().find( ListBiowning2Entity.class, o2_1_id );
|
||||
ListBiowning2Entity o2_2 = getEntityManager().find( ListBiowning2Entity.class, o2_2_id );
|
||||
|
@ -189,6 +192,7 @@ public class BasicBiowned extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "Revision query is wrong for bidirectional many-to-many when both sides are owners." )
|
||||
public void testHistoryOfO2_1() {
|
||||
ListBiowning1Entity o1_1 = getEntityManager().find( ListBiowning1Entity.class, o1_1_id );
|
||||
ListBiowning1Entity o1_2 = getEntityManager().find( ListBiowning1Entity.class, o1_2_id );
|
||||
|
@ -207,6 +211,7 @@ public class BasicBiowned extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "Revision query is wrong for bidirectional many-to-many when both sides are owners." )
|
||||
public void testHistoryOfO2_2() {
|
||||
ListBiowning1Entity o1_1 = getEntityManager().find( ListBiowning1Entity.class, o1_1_id );
|
||||
ListBiowning1Entity o1_2 = getEntityManager().find( ListBiowning1Entity.class, o1_2_id );
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.hibernate.envers.test.entities.manytomany.sametable.Child1Entity;
|
|||
import org.hibernate.envers.test.entities.manytomany.sametable.Child2Entity;
|
||||
import org.hibernate.envers.test.entities.manytomany.sametable.ParentEntity;
|
||||
import org.hibernate.envers.test.tools.TestTools;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -188,6 +189,7 @@ public class BasicSametable extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfParent1() {
|
||||
Child1Entity c1_1 = getEntityManager().find( Child1Entity.class, c1_1_id );
|
||||
Child1Entity c1_2 = getEntityManager().find( Child1Entity.class, c1_2_id );
|
||||
|
@ -213,6 +215,7 @@ public class BasicSametable extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfParent2() {
|
||||
Child1Entity c1_1 = getEntityManager().find( Child1Entity.class, c1_1_id );
|
||||
Child2Entity c2_1 = getEntityManager().find( Child2Entity.class, c2_1_id );
|
||||
|
@ -238,6 +241,7 @@ public class BasicSametable extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild1_1() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
@ -257,6 +261,7 @@ public class BasicSametable extends BaseEnversJPAFunctionalTestCase {
|
|||
|
||||
// TODO: was disabled?
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild1_2() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
|
||||
|
@ -274,6 +279,7 @@ public class BasicSametable extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild2_1() {
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
||||
|
@ -291,6 +297,7 @@ public class BasicSametable extends BaseEnversJPAFunctionalTestCase {
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild2_2() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
|
|
@ -12,12 +12,14 @@ import org.hibernate.envers.test.tools.TestTools;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
||||
/**
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@TestForIssue(jiraKey = "HHH-4962")
|
||||
@FailureExpectedWithNewMetamodel( message = "Secondary tables are not supported by envers yet.")
|
||||
public class ImplicitMappedByTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private Long ownedId = null;
|
||||
private Long owning1Id = null;
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.hibernate.envers.test.entities.components.Component1;
|
|||
import org.hibernate.metamodel.spi.binding.EntityBinding;
|
||||
import org.hibernate.metamodel.spi.relational.Column;
|
||||
import org.hibernate.metamodel.spi.relational.Value;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -43,6 +44,7 @@ import org.junit.Test;
|
|||
*
|
||||
* @author Erik-Berndt Scheper
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Assocation with generic type that extends @MappedSuperclass is not supported yet.")
|
||||
public class VersionsJoinTableRangeComponentNamingTest extends
|
||||
BaseEnversJPAFunctionalTestCase {
|
||||
private Integer vjrcte_id;
|
||||
|
|
|
@ -82,9 +82,9 @@ public class QuotedFieldsTest extends BaseEnversJPAFunctionalTestCase {
|
|||
TableSpecification table = getMetadata().getEntityBinding(
|
||||
"org.hibernate.envers.test.integration.naming.quotation.QuotedFieldsEntity_AUD"
|
||||
).getPrimaryTable();
|
||||
Column column1 = table.locateColumn( "id" );
|
||||
Column column2 = table.locateColumn( "data1" );
|
||||
Column column3 = table.locateColumn( "data2" );
|
||||
Column column1 = table.locateColumn( "`id`" );
|
||||
Column column2 = table.locateColumn( "`data1`" );
|
||||
Column column3 = table.locateColumn( "`data2`" );
|
||||
assert column1 != null;
|
||||
assert column2 != null;
|
||||
assert column3 != null;
|
||||
|
|
|
@ -9,12 +9,14 @@ import org.hibernate.envers.test.Priority;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
||||
/**
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@TestForIssue(jiraKey = "HHH-7157")
|
||||
@FailureExpectedWithNewMetamodel( message = "@MapsId is not supported yet." )
|
||||
public class MapsIdTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private PersonTuple tuple1Ver1 = null;
|
||||
private PersonTuple tuple2Ver1 = null;
|
||||
|
|
|
@ -10,12 +10,14 @@ import org.hibernate.envers.test.tools.TestTools;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
||||
/**
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@TestForIssue(jiraKey = "HHH-6661")
|
||||
@FailureExpectedWithNewMetamodel( message = "Secondary tables are not supported by envers yet.")
|
||||
public class HierarchyTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private Long parentId = null;
|
||||
private Long child1Id = null;
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.hibernate.proxy.HibernateProxy;
|
|||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
|
||||
/**
|
||||
|
@ -85,6 +86,7 @@ public class OneToOneWithPrimaryKeyJoinTest extends BaseEnversJPAFunctionalTestC
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@OneToOne @PrimaryKeyJoinColumn querying is not working." )
|
||||
public void testHistoryOfPerson() {
|
||||
Person personVer1 = new Person( personId, "Robert" );
|
||||
Account accountVer1 = new Account( accountId, "Saving" );
|
||||
|
@ -103,6 +105,7 @@ public class OneToOneWithPrimaryKeyJoinTest extends BaseEnversJPAFunctionalTestC
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@OneToOne @PrimaryKeyJoinColumn querying is not working." )
|
||||
public void testHistoryOfAccount() {
|
||||
Person personVer1 = new Person( personId, "Robert" );
|
||||
Account accountVer1 = new Account( accountId, "Saving" );
|
||||
|
@ -121,6 +124,7 @@ public class OneToOneWithPrimaryKeyJoinTest extends BaseEnversJPAFunctionalTestC
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@OneToOne @PrimaryKeyJoinColumn querying is not working." )
|
||||
public void testHistoryOfAccountNotAuditedOwners() {
|
||||
NotAuditedNoProxyPerson noProxyPersonVer1 = new NotAuditedNoProxyPerson( noProxyPersonId, "Kinga" );
|
||||
NotAuditedProxyPerson proxyPersonVer1 = new NotAuditedProxyPerson( proxyPersonId, "Lukasz" );
|
||||
|
|
|
@ -41,6 +41,7 @@ import org.hibernate.envers.test.entities.ids.EmbIdTestEntity;
|
|||
import org.hibernate.envers.test.entities.ids.MulId;
|
||||
import org.hibernate.envers.test.entities.ids.MulIdTestEntity;
|
||||
import org.hibernate.envers.test.tools.TestTools;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
import org.hibernate.testing.TestForIssue;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -437,6 +438,7 @@ public class SimpleQuery extends BaseEnversJPAFunctionalTestCase {
|
|||
|
||||
@Test
|
||||
@TestForIssue(jiraKey = "HHH-8567")
|
||||
@FailureExpectedWithNewMetamodel( message = "Revision query with restriction on @IdClass attributes is broken." )
|
||||
public void testMultipleIdPropertyRestriction() {
|
||||
MulIdTestEntity ver2 = (MulIdTestEntity) getAuditReader().createQuery()
|
||||
.forEntitiesAtRevision( MulIdTestEntity.class, 2 )
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
|||
import org.hibernate.envers.test.integration.inheritance.joined.ChildEntity;
|
||||
import org.hibernate.envers.test.integration.inheritance.joined.ParentEntity;
|
||||
import org.hibernate.metamodel.spi.relational.Value;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -41,6 +42,7 @@ import static org.junit.Assert.assertEquals;
|
|||
*
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Entity subclass has wrong ID type" )
|
||||
public class LongRevEntityInheritanceChildAuditing extends BaseEnversJPAFunctionalTestCase {
|
||||
@Override
|
||||
protected Class<?>[] getAnnotatedClasses() {
|
||||
|
|
|
@ -31,12 +31,14 @@ import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
|||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.metamodel.spi.binding.SecondaryTable;
|
||||
import org.hibernate.metamodel.spi.relational.Identifier;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Secondary tables are not supported by envers yet.")
|
||||
public class BasicSecondary extends BaseEnversJPAFunctionalTestCase {
|
||||
private Integer id;
|
||||
|
||||
|
|
|
@ -28,12 +28,14 @@ import java.util.Arrays;
|
|||
|
||||
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
||||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Secondary tables are not supported by envers yet.")
|
||||
public class NamingSecondary extends BaseEnversJPAFunctionalTestCase {
|
||||
private Integer id;
|
||||
|
||||
|
|
|
@ -29,12 +29,14 @@ import java.util.Arrays;
|
|||
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
||||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.envers.test.entities.ids.EmbId;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Secondary tables are not supported by envers yet.")
|
||||
public class EmbIdSecondary extends BaseEnversJPAFunctionalTestCase {
|
||||
private EmbId id;
|
||||
|
||||
|
|
|
@ -25,18 +25,18 @@ package org.hibernate.envers.test.integration.secondary.ids;
|
|||
|
||||
import javax.persistence.EntityManager;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
||||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.envers.test.entities.ids.MulId;
|
||||
import org.hibernate.mapping.Join;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Adam Warski (adam at warski dot org)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "Secondary tables are not supported by envers yet.")
|
||||
public class MulIdSecondary extends BaseEnversJPAFunctionalTestCase {
|
||||
private MulId id;
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ import org.hibernate.envers.test.entities.manytomany.sametable.Child2Entity;
|
|||
import org.hibernate.envers.test.entities.manytomany.sametable.ParentEntity;
|
||||
import org.hibernate.envers.test.entities.reventity.CustomDateRevEntity;
|
||||
import org.hibernate.envers.test.tools.TestTools;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -276,6 +277,7 @@ public class ValidityAuditStrategyRevEndTestCustomRevEnt extends BaseEnversJPAFu
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfParent1() {
|
||||
|
||||
Child1Entity c1_1 = getEntityManager()
|
||||
|
@ -305,6 +307,7 @@ public class ValidityAuditStrategyRevEndTestCustomRevEnt extends BaseEnversJPAFu
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfParent2() {
|
||||
Child1Entity c1_1 = getEntityManager()
|
||||
.find( Child1Entity.class, c1_1_id );
|
||||
|
@ -333,6 +336,7 @@ public class ValidityAuditStrategyRevEndTestCustomRevEnt extends BaseEnversJPAFu
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild1_1() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
@ -367,6 +371,7 @@ public class ValidityAuditStrategyRevEndTestCustomRevEnt extends BaseEnversJPAFu
|
|||
|
||||
// TODO: this was disabled?
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild1_2() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
|
||||
|
@ -399,6 +404,7 @@ public class ValidityAuditStrategyRevEndTestCustomRevEnt extends BaseEnversJPAFu
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild2_1() {
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
||||
|
@ -431,6 +437,7 @@ public class ValidityAuditStrategyRevEndTestCustomRevEnt extends BaseEnversJPAFu
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild2_2() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
|
|
@ -45,6 +45,7 @@ import org.hibernate.envers.test.entities.manytomany.sametable.Child1Entity;
|
|||
import org.hibernate.envers.test.entities.manytomany.sametable.Child2Entity;
|
||||
import org.hibernate.envers.test.entities.manytomany.sametable.ParentEntity;
|
||||
import org.hibernate.envers.test.tools.TestTools;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -274,6 +275,7 @@ public class ValidityAuditStrategyRevEndTsTest extends BaseEnversJPAFunctionalTe
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfParent1() {
|
||||
|
||||
Child1Entity c1_1 = getEntityManager()
|
||||
|
@ -303,6 +305,7 @@ public class ValidityAuditStrategyRevEndTsTest extends BaseEnversJPAFunctionalTe
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfParent2() {
|
||||
Child1Entity c1_1 = getEntityManager()
|
||||
.find( Child1Entity.class, c1_1_id );
|
||||
|
@ -331,6 +334,7 @@ public class ValidityAuditStrategyRevEndTsTest extends BaseEnversJPAFunctionalTe
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild1_1() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
@ -365,6 +369,7 @@ public class ValidityAuditStrategyRevEndTsTest extends BaseEnversJPAFunctionalTe
|
|||
|
||||
// TODO: this was disabled?
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild1_2() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
|
||||
|
@ -397,6 +402,7 @@ public class ValidityAuditStrategyRevEndTsTest extends BaseEnversJPAFunctionalTe
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild2_1() {
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
||||
|
@ -429,6 +435,7 @@ public class ValidityAuditStrategyRevEndTsTest extends BaseEnversJPAFunctionalTe
|
|||
}
|
||||
|
||||
@Test
|
||||
@FailureExpectedWithNewMetamodel( message = "@WhereJoinTable is not supported with new metamodel yet." )
|
||||
public void testHistoryOfChild2_2() {
|
||||
ParentEntity p1 = getEntityManager().find( ParentEntity.class, p1_id );
|
||||
ParentEntity p2 = getEntityManager().find( ParentEntity.class, p2_id );
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
|||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.envers.test.integration.superclass.auditAtMethodSuperclassLevel.AuditedMethodMappedSuperclass;
|
||||
import org.hibernate.envers.test.integration.superclass.auditAtMethodSuperclassLevel.NotAuditedSubclassEntity;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -38,6 +39,7 @@ import org.junit.Test;
|
|||
* @author Adam Warski (adam at warski dot org)
|
||||
* @author Hern&aacut;n Chanfreau
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class MappedSubclassingAllAuditedTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private Integer id2_1;
|
||||
private Integer id1_1;
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
|||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.envers.test.integration.superclass.auditAtMethodSuperclassLevel.AuditedMethodMappedSuperclass;
|
||||
import org.hibernate.envers.test.integration.superclass.auditAtMethodSuperclassLevel.NotAuditedSubclassEntity;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -38,6 +39,7 @@ import org.junit.Test;
|
|||
* @author Adam Warski (adam at warski dot org)
|
||||
* @author Hern&aacut;n Chanfreau
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class MappedSubclassingMethodAuditedTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private Integer id2_1;
|
||||
private Integer id1_1;
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
|||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.envers.test.integration.superclass.auditedAtSuperclassLevel.AuditedAllMappedSuperclass;
|
||||
import org.hibernate.envers.test.integration.superclass.auditedAtSuperclassLevel.NotAuditedSubclassEntity;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -38,6 +39,7 @@ import org.junit.Test;
|
|||
* @author Adam Warski (adam at warski dot org)
|
||||
* @author Hern&aacut;n Chanfreau
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class MappedSubclassingAllAuditedTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private Integer id2_1;
|
||||
private Integer id1_1;
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.hibernate.envers.test.BaseEnversJPAFunctionalTestCase;
|
|||
import org.hibernate.envers.test.Priority;
|
||||
import org.hibernate.envers.test.integration.superclass.auditedAtSuperclassLevel.AuditedAllMappedSuperclass;
|
||||
import org.hibernate.envers.test.integration.superclass.auditedAtSuperclassLevel.NotAuditedSubclassEntity;
|
||||
import org.hibernate.testing.FailureExpectedWithNewMetamodel;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -38,6 +39,7 @@ import org.junit.Test;
|
|||
* @author Adam Warski (adam at warski dot org)
|
||||
* @author Hern&aacut;n Chanfreau
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class MappedSubclassingMethodAuditedTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private Integer id2_1;
|
||||
private Integer id1_1;
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.hibernate.testing.TestForIssue;
|
|||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@TestForIssue(jiraKey = "HHH-4439")
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class AuditClassOverrideTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private Integer classAuditedEntityId = null;
|
||||
private Integer classNotAuditedEntityId = null;
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.junit.Test;
|
|||
*
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class MultipleAuditParentsTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private long childMultipleId = 1L;
|
||||
private Integer siteMultipleId = null;
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.junit.Test;
|
|||
*
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class SingleAuditParentsTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private long childSingleId = 1L;
|
||||
private Integer siteSingleId = null;
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.junit.Test;
|
|||
*
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class TotalAuditParentsTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private long babyCompleteId = 1L;
|
||||
private Integer siteCompleteId = null;
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.junit.Test;
|
|||
*
|
||||
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
|
||||
*/
|
||||
@FailureExpectedWithNewMetamodel( message = "@MappedSuperclass not supported with new metamodel by envers yet.")
|
||||
public class TransitiveAuditParentsTest extends BaseEnversJPAFunctionalTestCase {
|
||||
private long childImpTransId = 1L;
|
||||
private long childExpTransId = 2L;
|
||||
|
|
|
@ -28,14 +28,11 @@ import java.util.Arrays;
|
|||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.hibernate.envers.enhanced.SequenceIdRevisionEntity;
|
||||
import org.hibernate.mapping.PersistentClass;
|
||||
import org.hibernate.mapping.Property;
|
||||
import org.hibernate.metamodel.spi.binding.AttributeBinding;
|
||||
import org.hibernate.metamodel.spi.binding.EntityBinding;
|
||||
|
||||
|
|
Loading…
Reference in New Issue