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