[hibernate-commits] Hibernate SVN: r16063 - in core/branches/envers-hibernate-3.3: src/main/java/org/hibernate/envers/configuration/metadata and 12 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue Mar 3 11:54:22 EST 2009


Author: adamw
Date: 2009-03-03 11:54:21 -0500 (Tue, 03 Mar 2009)
New Revision: 16063

Added:
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/entities/components/ComponentSetTestEntity.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections/
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java
Removed:
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java
   core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java
Modified:
   core/branches/envers-hibernate-3.3/pom.xml
   core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/ComponentMetadataGenerator.java
   core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AnnotationsMetadataReader.java
   core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java
   core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/ComponentPropertyMapper.java
   core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/CompositeMapperBuilder.java
   core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/MultiPropertyMapper.java
   core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/SubclassPropertyMapper.java
   core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/relation/AbstractCollectionMapper.java
   core/branches/envers-hibernate-3.3/src/test/resources/testng.xml
Log:
svn merge -r 15899:16062 https://svn.jboss.org/repos/hibernate/core/trunk/envers .

Modified: core/branches/envers-hibernate-3.3/pom.xml
===================================================================
--- core/branches/envers-hibernate-3.3/pom.xml	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/pom.xml	2009-03-03 16:54:21 UTC (rev 16063)
@@ -7,7 +7,7 @@
     <parent>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-parent</artifactId>
-        <version>3.4.0-SNAPSHOT</version>
+        <version>3.5.0-SNAPSHOT</version>
     </parent>
 
     <groupId>org.jboss.envers</groupId>
@@ -84,42 +84,6 @@
         <dependency>
             <groupId>org.hibernate</groupId>
             <artifactId>hibernate-entitymanager</artifactId>
-            <exclusions>
-                <!-- todo : only needed until we migrate EM back to core -->
-                <exclusion>
-                    <groupId>org.hibernate</groupId>
-                    <artifactId>hibernate</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>javassist</groupId>
-                    <artifactId>javassist</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>jboss</groupId>
-                    <artifactId>javassist</artifactId>
-                </exclusion>
-                <exclusion>
-                    <!-- OMG, YUCK YUCK YUCK -->
-                    <groupId>org.hibernate</groupId>
-                    <artifactId>hibernate-validator</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>net.sf.ehcache</groupId>
-                    <artifactId>ehcache</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>cglib</groupId>
-                    <artifactId>cglib</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>asm</groupId>
-                    <artifactId>asm</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>asm</groupId>
-                    <artifactId>asm-attrs</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.hibernate</groupId>
@@ -159,11 +123,6 @@
                 <version>3.3.1.GA</version>
             </dependency>
             <dependency>
-                <groupId>javax.persistence</groupId>
-                <artifactId>persistence-api</artifactId>
-                <version>1.0</version>
-            </dependency>
-            <dependency>
                 <groupId>org.hibernate</groupId>
                 <artifactId>hibernate-annotations</artifactId>
                 <version>3.4.0.GA</version>
@@ -184,6 +143,11 @@
                 <version>3.2.0.ga</version>
             </dependency>
             <dependency>
+                <groupId>javax.persistence</groupId>
+                <artifactId>persistence-api</artifactId>
+                <version>1.0</version>
+            </dependency>
+            <dependency>
                 <groupId>ant</groupId>
                 <artifactId>ant</artifactId>
                 <version>1.6.5</version>

Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/ComponentMetadataGenerator.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/ComponentMetadataGenerator.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/ComponentMetadataGenerator.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -27,7 +27,8 @@
 							 EntityXmlMappingData xmlMappingData, boolean firstPass) {
 		Component prop_component = (Component) value;
 
-		CompositeMapperBuilder componentMapper = mapper.addComponent(propertyAuditingData.getPropertyData());
+		CompositeMapperBuilder componentMapper = mapper.addComponent(propertyAuditingData.getPropertyData(),
+				prop_component.getComponentClassName());
 
 		// The property auditing data must be for a component.
 		ComponentAuditingData componentAuditingData = (ComponentAuditingData) propertyAuditingData;

Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AnnotationsMetadataReader.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AnnotationsMetadataReader.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AnnotationsMetadataReader.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -118,7 +118,7 @@
 			}
 
 			new AuditedPropertiesReader(defaultStore, new PersistentClassPropertiesSource(xclass), auditData,
-					globalCfg, "").read();
+					globalCfg, reflectionManager, "").read();
 
 			addAuditTable(xclass);
 			addAuditSecondaryTables(xclass);

Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -13,6 +13,7 @@
 
 import org.hibernate.annotations.common.reflection.XClass;
 import org.hibernate.annotations.common.reflection.XProperty;
+import org.hibernate.annotations.common.reflection.ReflectionManager;
 import org.hibernate.envers.AuditJoinTable;
 import org.hibernate.envers.AuditOverride;
 import org.hibernate.envers.AuditOverrides;
@@ -24,6 +25,7 @@
 import org.hibernate.mapping.Component;
 import org.hibernate.mapping.Property;
 import org.hibernate.mapping.Value;
+import org.hibernate.MappingException;
 import org.jboss.envers.Versioned;
 
 /**
@@ -40,6 +42,7 @@
 	private final PersistentPropertiesSource persistentPropertiesSource;
 	private final AuditedPropertiesHolder auditedPropertiesHolder;
 	private final GlobalConfiguration globalCfg;
+	private final ReflectionManager reflectionManager;
 	private final String propertyNamePrefix;
 
 	private final Set<String> propertyAccessedPersistentProperties;
@@ -49,11 +52,13 @@
 								   PersistentPropertiesSource persistentPropertiesSource,
 								   AuditedPropertiesHolder auditedPropertiesHolder,
 								   GlobalConfiguration globalCfg,
+								   ReflectionManager reflectionManager,
 								   String propertyNamePrefix) {
 		this.defaultStore = defaultStore;
 		this.persistentPropertiesSource = persistentPropertiesSource;
 		this.auditedPropertiesHolder = auditedPropertiesHolder;
 		this.globalCfg = globalCfg;
+		this.reflectionManager = reflectionManager;
 		this.propertyNamePrefix = propertyNamePrefix;
 
 		propertyAccessedPersistentProperties = newHashSet();
@@ -104,9 +109,10 @@
 					isAudited = fillPropertyData(property, componentData, accessType);
 
 					PersistentPropertiesSource componentPropertiesSource = new ComponentPropertiesSource(
-							property.getType(), (Component) propertyValue);
+							(Component) propertyValue);
 					new AuditedPropertiesReader(ModificationStore.FULL, componentPropertiesSource, componentData,
-							globalCfg, propertyNamePrefix+ MappingTools.createComponentPrefix(property.getName()))
+							globalCfg, reflectionManager,
+							propertyNamePrefix + MappingTools.createComponentPrefix(property.getName()))
 							.read();
 
 					propertyData = componentData;
@@ -255,8 +261,13 @@
 		private final XClass xclass;
 		private final Component component;
 
-		private ComponentPropertiesSource(XClass xclass, Component component) {
-			this.xclass = xclass;
+		private ComponentPropertiesSource(Component component) {
+			try {
+				this.xclass = reflectionManager.classForName(component.getComponentClassName(), this.getClass());
+			} catch (ClassNotFoundException e) {
+				throw new MappingException(e);
+			}
+			
 			this.component = component;
 		}
 

Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/ComponentPropertyMapper.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/ComponentPropertyMapper.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/ComponentPropertyMapper.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -34,7 +34,6 @@
 import org.hibernate.envers.tools.reflection.ReflectionTools;
 
 import org.hibernate.collection.PersistentCollection;
-import org.hibernate.property.Getter;
 import org.hibernate.property.Setter;
 import org.hibernate.util.ReflectHelper;
 
@@ -42,20 +41,22 @@
  * @author Adam Warski (adam at warski dot org)
  */
 public class ComponentPropertyMapper implements PropertyMapper, CompositeMapperBuilder {
-    private PropertyData propertyData;
-    private ExtendedPropertyMapper delegate;
+    private final PropertyData propertyData;
+    private final ExtendedPropertyMapper delegate;
+	private final String componentClassName;
 
-    public ComponentPropertyMapper(PropertyData propertyData) {
+    public ComponentPropertyMapper(PropertyData propertyData, String componentClassName) {
         this.propertyData = propertyData;
         this.delegate = new MultiPropertyMapper();
+		this.componentClassName = componentClassName;
     }
 
 	public void add(PropertyData propertyData) {
         delegate.add(propertyData);
     }
 
-    public CompositeMapperBuilder addComponent(PropertyData propertyData) {
-        return delegate.addComponent(propertyData);
+    public CompositeMapperBuilder addComponent(PropertyData propertyData, String componentClassName) {
+        return delegate.addComponent(propertyData, componentClassName);
     }
 
     public void addComposite(PropertyData propertyData, PropertyMapper propertyMapper) {
@@ -71,11 +72,11 @@
             return;
         }
 
-        Getter getter = ReflectionTools.getGetter(obj.getClass(), propertyData);
         Setter setter = ReflectionTools.getSetter(obj.getClass(), propertyData);
 
         try {
-            Object subObj = ReflectHelper.getDefaultConstructor(getter.getReturnType()).newInstance();
+            Object subObj = ReflectHelper.getDefaultConstructor(
+					Thread.currentThread().getContextClassLoader().loadClass(componentClassName)).newInstance();
             setter.set(obj, subObj, null);
             delegate.mapToEntityFromMap(verCfg, subObj, data, primaryKey, versionsReader, revision);
         } catch (Exception e) {

Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/CompositeMapperBuilder.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/CompositeMapperBuilder.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/CompositeMapperBuilder.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -29,6 +29,6 @@
  * @author Adam Warski (adam at warski dot org)
  */
 public interface CompositeMapperBuilder extends SimpleMapperBuilder {    
-    public CompositeMapperBuilder addComponent(PropertyData propertyData);
+    public CompositeMapperBuilder addComponent(PropertyData propertyData, String componentClassName);
     public void addComposite(PropertyData propertyData, PropertyMapper propertyMapper);
 }

Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/MultiPropertyMapper.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/MultiPropertyMapper.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/MultiPropertyMapper.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -56,13 +56,13 @@
         propertyDatas.put(propertyData.getName(), propertyData);
     }
 
-    public CompositeMapperBuilder addComponent(PropertyData propertyData) {
+    public CompositeMapperBuilder addComponent(PropertyData propertyData, String componentClassName) {
         if (properties.get(propertyData) != null) {
 			// This is needed for second pass to work properly in the components mapper
             return (CompositeMapperBuilder) properties.get(propertyData);
         }
 
-        ComponentPropertyMapper componentMapperBuilder = new ComponentPropertyMapper(propertyData);
+        ComponentPropertyMapper componentMapperBuilder = new ComponentPropertyMapper(propertyData, componentClassName);
 		addComposite(propertyData, componentMapperBuilder);
 
         return componentMapperBuilder;

Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/SubclassPropertyMapper.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/SubclassPropertyMapper.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/SubclassPropertyMapper.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -86,8 +86,8 @@
         }
     }
 
-    public CompositeMapperBuilder addComponent(PropertyData propertyData) {
-        return main.addComponent(propertyData);
+    public CompositeMapperBuilder addComponent(PropertyData propertyData, String componentClassName) {
+        return main.addComponent(propertyData, componentClassName);
     }
 
     public void addComposite(PropertyData propertyData, PropertyMapper propertyMapper) {

Modified: core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/relation/AbstractCollectionMapper.java
===================================================================
--- core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/relation/AbstractCollectionMapper.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/entities/mapper/relation/AbstractCollectionMapper.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -114,13 +114,16 @@
 
         Set<Object> added = new HashSet<Object>();
         if (newColl != null) { added.addAll(newCollection); }
-        if (oldColl != null) { added.removeAll(oldCollection); }
+		// Re-hashing the old collection as the hash codes of the elements there may have changed, and the
+		// removeAll in AbstractSet has an implementation that is hashcode-change sensitive (as opposed to addAll).
+        if (oldColl != null) { added.removeAll(new HashSet(oldCollection)); }
 
         addCollectionChanges(collectionChanges, added, RevisionType.ADD, id);
 
         Set<Object> deleted = new HashSet<Object>();
         if (oldColl != null) { deleted.addAll(oldCollection); }
-        if (newColl != null) { deleted.removeAll(newCollection); }
+		// The same as above - re-hashing new collection.
+        if (newColl != null) { deleted.removeAll(new HashSet(newCollection)); }
 
         addCollectionChanges(collectionChanges, deleted, RevisionType.DEL, id);
 

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/entities/components/ComponentSetTestEntity.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/entities/components/ComponentSetTestEntity.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/entities/components/ComponentSetTestEntity.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/entities/components/ComponentSetTestEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,100 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.entities.components;
+
+import javax.persistence.Embedded;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.hibernate.envers.Audited;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+ at Entity
+ at Audited
+public class ComponentSetTestEntity {
+    @Id
+    @GeneratedValue
+    private Integer id;
+
+    @Embedded
+    @Audited
+    private Set<Component1> comps = new HashSet<Component1>();
+
+	public ComponentSetTestEntity() {
+	}
+
+	public ComponentSetTestEntity(Integer id) {
+		this.id = id;
+	}
+
+	public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+	public Set<Component1> getComps() {
+		return comps;
+	}
+
+	public void setComps(Set<Component1> comps) {
+		this.comps = comps;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof ComponentSetTestEntity)) return false;
+
+		ComponentSetTestEntity that = (ComponentSetTestEntity) o;
+
+		if (comps != null ? !comps.equals(that.comps) : that.comps != null) return false;
+		if (id != null ? !id.equals(that.id) : that.id != null) return false;
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = id != null ? id.hashCode() : 0;
+		result = 31 * result + (comps != null ? comps.hashCode() : 0);
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		return "ComponentSetTestEntity{" +
+				"id=" + id +
+				", comps=" + comps +
+				'}';
+	}
+}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/components/collections)

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,87 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- */
-package org.hibernate.envers.test.integration.components.collections;
-
-import java.util.Arrays;
-import java.util.Set;
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.hibernate.envers.test.entities.components.Component1;
-import org.hibernate.envers.test.entities.components.ComponentSetTestEntity;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.ejb.Ejb3Configuration;
-
-/**
- * TODO: enable and implement
- * @author Adam Warski (adam at warski dot org)
- */
-public class CollectionOfComponents extends AbstractEntityTest {
-    private Integer id1;
-
-    public void configure(Ejb3Configuration cfg) {
-        cfg.addAnnotatedClass(ComponentSetTestEntity.class);
-    }
-
-    @BeforeClass(dependsOnMethods = "init")
-    public void initData() {
-        // Revision 1
-        EntityManager em = getEntityManager();
-        em.getTransaction().begin();
-
-        ComponentSetTestEntity cte1 = new ComponentSetTestEntity();
-
-        em.persist(cte1);
-
-        em.getTransaction().commit();
-
-        // Revision 2
-        em = getEntityManager();
-        em.getTransaction().begin();
-
-        cte1 = em.find(ComponentSetTestEntity.class, cte1.getId());
-
-        cte1.getComps().add(new Component1("a", "b"));
-
-        em.getTransaction().commit();
-
-        id1 = cte1.getId();
-    }
-
-    @Test(enabled = false)
-    public void testRevisionsCounts() {
-        assert Arrays.asList(1, 2).equals(getAuditReader().getRevisions(ComponentSetTestEntity.class, id1));
-    }
-
-    @Test(enabled = false)
-    public void testHistoryOfId1() {
-        assert getAuditReader().find(ComponentSetTestEntity.class, id1, 1).getComps().size() == 0;
-		
-		Set<Component1> comps1 = getAuditReader().find(ComponentSetTestEntity.class, id1, 2).getComps();
-        assert comps1.size() == 1;
-		assert comps1.contains(new Component1("a", "b"));
-    }
-}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/components/collections/CollectionOfComponents.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,87 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.integration.components.collections;
+
+import java.util.Arrays;
+import java.util.Set;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.hibernate.envers.test.entities.components.Component1;
+import org.hibernate.envers.test.entities.components.ComponentSetTestEntity;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * TODO: enable and implement
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class CollectionOfComponents extends AbstractEntityTest {
+    private Integer id1;
+
+    public void configure(Ejb3Configuration cfg) {
+        cfg.addAnnotatedClass(ComponentSetTestEntity.class);
+    }
+
+    @BeforeClass(dependsOnMethods = "init")
+    public void initData() {
+        // Revision 1
+        EntityManager em = getEntityManager();
+        em.getTransaction().begin();
+
+        ComponentSetTestEntity cte1 = new ComponentSetTestEntity();
+
+        em.persist(cte1);
+
+        em.getTransaction().commit();
+
+        // Revision 2
+        em = getEntityManager();
+        em.getTransaction().begin();
+
+        cte1 = em.find(ComponentSetTestEntity.class, cte1.getId());
+
+        cte1.getComps().add(new Component1("a", "b"));
+
+        em.getTransaction().commit();
+
+        id1 = cte1.getId();
+    }
+
+    @Test(enabled = false)
+    public void testRevisionsCounts() {
+        assert Arrays.asList(1, 2).equals(getAuditReader().getRevisions(ComponentSetTestEntity.class, id1));
+    }
+
+    @Test(enabled = false)
+    public void testHistoryOfId1() {
+        assert getAuditReader().find(ComponentSetTestEntity.class, id1, 1).getComps().size() == 0;
+		
+		Set<Component1> comps1 = getAuditReader().find(ComponentSetTestEntity.class, id1, 2).getComps();
+        assert comps1.size() == 1;
+		assert comps1.contains(new Component1("a", "b"));
+    }
+}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/hashcode)

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,103 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- */
-package org.hibernate.envers.test.integration.hashcode;
-
-import java.util.Arrays;
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.hibernate.envers.test.tools.TestTools;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.ejb.Ejb3Configuration;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
-public class ChangingHashcode extends AbstractEntityTest {
-	private Long pageId;
-	private Long imageId;
-
-    public void configure(Ejb3Configuration cfg) {
-        cfg.addAnnotatedClass(WikiPage.class);
-        cfg.addAnnotatedClass(WikiImage.class);
-    }
-
-    @BeforeClass(dependsOnMethods = "init")
-    public void initData() {
-        // Revision 1
-        EntityManager em = getEntityManager();
-        em.getTransaction().begin();
-
-		WikiPage page = new WikiPage("title", "content");
-        em.persist(page);
-
-        em.getTransaction().commit();
-
-        // Revision 2
-        em = getEntityManager();
-        em.getTransaction().begin();
-
-        WikiImage image = new WikiImage("name1");
-		em.persist(image);
-
-		page = em.find(WikiPage.class, page.getId());
-		page.getImages().add(image);
-
-        em.getTransaction().commit();
-
-        // Revision 3
-        em = getEntityManager();
-        em.getTransaction().begin();
-
-        image = em.find(WikiImage.class, image.getId());
-		image.setName("name2");
-
-        em.getTransaction().commit();
-
-		pageId = page.getId();
-		imageId = image.getId();
-    }
-
-    @Test
-    public void testRevisionsCounts() {
-        assert Arrays.asList(1, 2).equals(getAuditReader().getRevisions(WikiPage.class, pageId));
-        assert Arrays.asList(2, 3).equals(getAuditReader().getRevisions(WikiImage.class, imageId));
-    }
-
-    @Test
-    public void testHistoryOfImage() {
-		assert getAuditReader().find(WikiImage.class, imageId, 1) == null;
-        assert getAuditReader().find(WikiImage.class, imageId, 2).equals(new WikiImage("name1"));
-        assert getAuditReader().find(WikiImage.class, imageId, 3).equals(new WikiImage("name2"));
-    }
-
-    @Test
-    public void testHistoryOfPage() {
-        assert getAuditReader().find(WikiPage.class, pageId, 1).getImages().size() == 0;
-        assert getAuditReader().find(WikiPage.class, pageId, 2).getImages().equals(TestTools.makeSet(new WikiImage("name1")));
-        assert getAuditReader().find(WikiPage.class, pageId, 3).getImages().equals(TestTools.makeSet(new WikiImage("name2")));
-    }
-}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/ChangingHashcode.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,103 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.integration.hashcode;
+
+import java.util.Arrays;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.hibernate.envers.test.tools.TestTools;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class ChangingHashcode extends AbstractEntityTest {
+	private Long pageId;
+	private Long imageId;
+
+    public void configure(Ejb3Configuration cfg) {
+        cfg.addAnnotatedClass(WikiPage.class);
+        cfg.addAnnotatedClass(WikiImage.class);
+    }
+
+    @BeforeClass(dependsOnMethods = "init")
+    public void initData() {
+        // Revision 1
+        EntityManager em = getEntityManager();
+        em.getTransaction().begin();
+
+		WikiPage page = new WikiPage("title", "content");
+        em.persist(page);
+
+        em.getTransaction().commit();
+
+        // Revision 2
+        em = getEntityManager();
+        em.getTransaction().begin();
+
+        WikiImage image = new WikiImage("name1");
+		em.persist(image);
+
+		page = em.find(WikiPage.class, page.getId());
+		page.getImages().add(image);
+
+        em.getTransaction().commit();
+
+        // Revision 3
+        em = getEntityManager();
+        em.getTransaction().begin();
+
+        image = em.find(WikiImage.class, image.getId());
+		image.setName("name2");
+
+        em.getTransaction().commit();
+
+		pageId = page.getId();
+		imageId = image.getId();
+    }
+
+    @Test
+    public void testRevisionsCounts() {
+        assert Arrays.asList(1, 2).equals(getAuditReader().getRevisions(WikiPage.class, pageId));
+        assert Arrays.asList(2, 3).equals(getAuditReader().getRevisions(WikiImage.class, imageId));
+    }
+
+    @Test
+    public void testHistoryOfImage() {
+		assert getAuditReader().find(WikiImage.class, imageId, 1) == null;
+        assert getAuditReader().find(WikiImage.class, imageId, 2).equals(new WikiImage("name1"));
+        assert getAuditReader().find(WikiImage.class, imageId, 3).equals(new WikiImage("name2"));
+    }
+
+    @Test
+    public void testHistoryOfPage() {
+        assert getAuditReader().find(WikiPage.class, pageId, 1).getImages().size() == 0;
+        assert getAuditReader().find(WikiPage.class, pageId, 2).getImages().equals(TestTools.makeSet(new WikiImage("name1")));
+        assert getAuditReader().find(WikiPage.class, pageId, 3).getImages().equals(TestTools.makeSet(new WikiImage("name2")));
+    }
+}
\ No newline at end of file

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,65 +0,0 @@
-package org.hibernate.envers.test.integration.hashcode;
-
-import org.hibernate.envers.Audited;
-
-import javax.persistence.Id;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Entity;
-import javax.persistence.Basic;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
- at Entity
- at Audited
-public class WikiImage {
-	@Id
-	@GeneratedValue
-	private Long id;
-
-	@Basic
-	private String name;
-
-	public WikiImage() {
-	}
-
-	public WikiImage(String name) {
-		this.name = name;
-	}
-
-	public Long getId() {
-		return id;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	@Override
-	public boolean equals(Object o) {
-		if (this == o) return true;
-		if (!(o instanceof WikiImage)) return false;
-
-		WikiImage wikiImage = (WikiImage) o;
-
-		if (name != null ? !name.equals(wikiImage.name) : wikiImage.name != null) return false;
-
-		return true;
-	}
-
-	@Override
-	public int hashCode() {
-		return name != null ? name.hashCode() : 0;
-	}
-
-	@Override
-	public String toString() {
-		return "WikiImage{" +
-				"name='" + name + '\'' +
-				'}';
-	}
-}

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiImage.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,65 @@
+package org.hibernate.envers.test.integration.hashcode;
+
+import org.hibernate.envers.Audited;
+
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Entity;
+import javax.persistence.Basic;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+ at Entity
+ at Audited
+public class WikiImage {
+	@Id
+	@GeneratedValue
+	private Long id;
+
+	@Basic
+	private String name;
+
+	public WikiImage() {
+	}
+
+	public WikiImage(String name) {
+		this.name = name;
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof WikiImage)) return false;
+
+		WikiImage wikiImage = (WikiImage) o;
+
+		if (name != null ? !name.equals(wikiImage.name) : wikiImage.name != null) return false;
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		return name != null ? name.hashCode() : 0;
+	}
+
+	@Override
+	public String toString() {
+		return "WikiImage{" +
+				"name='" + name + '\'' +
+				'}';
+	}
+}

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,109 +0,0 @@
-package org.hibernate.envers.test.integration.hashcode;
-
-import org.hibernate.annotations.CollectionOfElements;
-import org.hibernate.envers.Audited;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.Basic;
-import java.util.Set;
-import java.util.HashSet;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
- at Entity
- at Audited
-public class WikiPage {
-	@Id
-	@GeneratedValue
-	private Long id;
-
-	@Basic
-	private String title;
-
-	@Basic
-	private String content;
-
-	@CollectionOfElements
-	private Set<String> links = new HashSet<String>();
-
-	@OneToMany
-	private Set<WikiImage> images = new HashSet<WikiImage>();
-
-	public WikiPage() {
-	}
-
-	public WikiPage(String title, String content) {
-		this.title = title;
-		this.content = content;
-	}
-
-	public Long getId() {
-		return id;
-	}
-
-	public String getTitle() {
-		return title;
-	}
-
-	public void setTitle(String title) {
-		this.title = title;
-	}
-
-	public String getContent() {
-		return content;
-	}
-
-	public void setContent(String content) {
-		this.content = content;
-	}
-
-	public Set<String> getLinks() {
-		return links;
-	}
-
-	public void setLinks(Set<String> links) {
-		this.links = links;
-	}
-
-	public Set<WikiImage> getImages() {
-		return images;
-	}
-
-	public void setImages(Set<WikiImage> images) {
-		this.images = images;
-	}
-
-	@Override
-	public boolean equals(Object o) {
-		if (this == o) return true;
-		if (!(o instanceof WikiPage)) return false;
-
-		WikiPage wikiPage = (WikiPage) o;
-
-		if (content != null ? !content.equals(wikiPage.content) : wikiPage.content != null) return false;
-		if (title != null ? !title.equals(wikiPage.title) : wikiPage.title != null) return false;
-
-		return true;
-	}
-
-	@Override
-	public int hashCode() {
-		int result = title != null ? title.hashCode() : 0;
-		result = 31 * result + (content != null ? content.hashCode() : 0);
-		return result;
-	}
-
-	@Override
-	public String toString() {
-		return "WikiPage{" +
-				"title='" + title + '\'' +
-				", content='" + content + '\'' +
-				", links=" + links +
-				", images=" + images +
-				'}';
-	}
-}

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/hashcode/WikiPage.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,109 @@
+package org.hibernate.envers.test.integration.hashcode;
+
+import org.hibernate.annotations.CollectionOfElements;
+import org.hibernate.envers.Audited;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Basic;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+ at Entity
+ at Audited
+public class WikiPage {
+	@Id
+	@GeneratedValue
+	private Long id;
+
+	@Basic
+	private String title;
+
+	@Basic
+	private String content;
+
+	@CollectionOfElements
+	private Set<String> links = new HashSet<String>();
+
+	@OneToMany
+	private Set<WikiImage> images = new HashSet<WikiImage>();
+
+	public WikiPage() {
+	}
+
+	public WikiPage(String title, String content) {
+		this.title = title;
+		this.content = content;
+	}
+
+	public Long getId() {
+		return id;
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+
+	public String getContent() {
+		return content;
+	}
+
+	public void setContent(String content) {
+		this.content = content;
+	}
+
+	public Set<String> getLinks() {
+		return links;
+	}
+
+	public void setLinks(Set<String> links) {
+		this.links = links;
+	}
+
+	public Set<WikiImage> getImages() {
+		return images;
+	}
+
+	public void setImages(Set<WikiImage> images) {
+		this.images = images;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof WikiPage)) return false;
+
+		WikiPage wikiPage = (WikiPage) o;
+
+		if (content != null ? !content.equals(wikiPage.content) : wikiPage.content != null) return false;
+		if (title != null ? !title.equals(wikiPage.title) : wikiPage.title != null) return false;
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = title != null ? title.hashCode() : 0;
+		result = 31 * result + (content != null ? content.hashCode() : 0);
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		return "WikiPage{" +
+				"title='" + title + '\'' +
+				", content='" + content + '\'' +
+				", links=" + links +
+				", images=" + images +
+				'}';
+	}
+}

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces)

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components)

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,73 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- */
-package org.hibernate.envers.test.integration.interfaces.components;
-
-import javax.persistence.Embeddable;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
- at Embeddable
-public class Component1 implements IComponent {
-    private String data;
-
-	public Component1(String data) {
-		this.data = data;
-	}
-
-	public Component1() {
-	}
-
-	public String getData() {
-		return data;
-	}
-
-	public void setData(String data) {
-		this.data = data;
-	}
-
-	@Override
-	public boolean equals(Object o) {
-		if (this == o) return true;
-		if (!(o instanceof Component1)) return false;
-
-		Component1 that = (Component1) o;
-
-		if (data != null ? !data.equals(that.data) : that.data != null) return false;
-
-		return true;
-	}
-
-	@Override
-	public int hashCode() {
-		return data != null ? data.hashCode() : 0;
-	}
-
-	@Override
-	public String toString() {
-		return "Component1{" +
-				"data='" + data + '\'' +
-				'}';
-	}
-}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/Component1.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,73 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.integration.interfaces.components;
+
+import javax.persistence.Embeddable;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+ at Embeddable
+public class Component1 implements IComponent {
+    private String data;
+
+	public Component1(String data) {
+		this.data = data;
+	}
+
+	public Component1() {
+	}
+
+	public String getData() {
+		return data;
+	}
+
+	public void setData(String data) {
+		this.data = data;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof Component1)) return false;
+
+		Component1 that = (Component1) o;
+
+		if (data != null ? !data.equals(that.data) : that.data != null) return false;
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		return data != null ? data.hashCode() : 0;
+	}
+
+	@Override
+	public String toString() {
+		return "Component1{" +
+				"data='" + data + '\'' +
+				'}';
+	}
+}
\ No newline at end of file

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,102 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- */
-package org.hibernate.envers.test.integration.interfaces.components;
-
-import javax.persistence.Embedded;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-import org.hibernate.envers.Audited;
-import org.hibernate.annotations.Target;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
- at Entity
-    @Audited
-public class ComponentTestEntity {
-    @Id
-    @GeneratedValue
-    private Integer id;
-
-    @Embedded
-	@Target(Component1.class)
-    private IComponent comp1;
-
-    public ComponentTestEntity() {
-    }
-
-	public ComponentTestEntity(IComponent comp1) {
-		this.comp1 = comp1;
-	}
-
-	public ComponentTestEntity(Integer id, IComponent comp1) {
-		this.id = id;
-		this.comp1 = comp1;
-	}
-
-	public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-	public IComponent getComp1() {
-		return comp1;
-	}
-
-	public void setComp1(IComponent comp1) {
-		this.comp1 = comp1;
-	}
-
-	@Override
-	public boolean equals(Object o) {
-		if (this == o) return true;
-		if (!(o instanceof ComponentTestEntity)) return false;
-
-		ComponentTestEntity that = (ComponentTestEntity) o;
-
-		if (comp1 != null ? !comp1.equals(that.comp1) : that.comp1 != null) return false;
-
-		return true;
-	}
-
-	@Override
-	public int hashCode() {
-		int result = id != null ? id.hashCode() : 0;
-		result = 31 * result + (comp1 != null ? comp1.hashCode() : 0);
-		return result;
-	}
-
-	@Override
-	public String toString() {
-		return "ComponentTestEntity{" +
-				"id=" + id +
-				", comp1=" + comp1 +
-				'}';
-	}
-}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/ComponentTestEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,102 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.integration.interfaces.components;
+
+import javax.persistence.Embedded;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.hibernate.envers.Audited;
+import org.hibernate.annotations.Target;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+ at Entity
+    @Audited
+public class ComponentTestEntity {
+    @Id
+    @GeneratedValue
+    private Integer id;
+
+    @Embedded
+	@Target(Component1.class)
+    private IComponent comp1;
+
+    public ComponentTestEntity() {
+    }
+
+	public ComponentTestEntity(IComponent comp1) {
+		this.comp1 = comp1;
+	}
+
+	public ComponentTestEntity(Integer id, IComponent comp1) {
+		this.id = id;
+		this.comp1 = comp1;
+	}
+
+	public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+	public IComponent getComp1() {
+		return comp1;
+	}
+
+	public void setComp1(IComponent comp1) {
+		this.comp1 = comp1;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof ComponentTestEntity)) return false;
+
+		ComponentTestEntity that = (ComponentTestEntity) o;
+
+		if (comp1 != null ? !comp1.equals(that.comp1) : that.comp1 != null) return false;
+
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = id != null ? id.hashCode() : 0;
+		result = 31 * result + (comp1 != null ? comp1.hashCode() : 0);
+		return result;
+	}
+
+	@Override
+	public String toString() {
+		return "ComponentTestEntity{" +
+				"id=" + id +
+				", comp1=" + comp1 +
+				'}';
+	}
+}
\ No newline at end of file

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,9 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.components;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
-public interface IComponent {
-	String getData();
-	void setData(String data);
-}

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/IComponent.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,9 @@
+package org.hibernate.envers.test.integration.interfaces.components;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public interface IComponent {
+	String getData();
+	void setData(String data);
+}

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,95 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- */
-package org.hibernate.envers.test.integration.interfaces.components;
-
-import java.util.Arrays;
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.ejb.Ejb3Configuration;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
-public class InterfacesComponents extends AbstractEntityTest {
-    private Integer id1;
-
-    public void configure(Ejb3Configuration cfg) {
-        cfg.addAnnotatedClass(ComponentTestEntity.class);
-    }
-
-    @BeforeClass(dependsOnMethods = "init")
-    public void initData() {
-        // Revision 1
-        EntityManager em = getEntityManager();
-        em.getTransaction().begin();
-
-        ComponentTestEntity cte1 = new ComponentTestEntity(new Component1("a"));
-
-        em.persist(cte1);
-
-        em.getTransaction().commit();
-
-        // Revision 2
-        em = getEntityManager();
-        em.getTransaction().begin();
-
-        cte1 = em.find(ComponentTestEntity.class, cte1.getId());
-
-        cte1.setComp1(new Component1("b"));
-
-        em.getTransaction().commit();
-
-        // Revision 3
-        em = getEntityManager();
-        em.getTransaction().begin();
-
-        cte1 = em.find(ComponentTestEntity.class, cte1.getId());
-
-        cte1.getComp1().setData("c");
-
-        em.getTransaction().commit();
-
-        id1 = cte1.getId();
-    }
-
-    @Test
-    public void testRevisionsCounts() {
-        assert Arrays.asList(1, 2, 3).equals(getAuditReader().getRevisions(ComponentTestEntity.class, id1));
-    }
-
-    @Test
-    public void testHistoryOfId1() {
-        ComponentTestEntity ver1 = new ComponentTestEntity(id1, new Component1("a"));
-		ComponentTestEntity ver2 = new ComponentTestEntity(id1, new Component1("b"));
-		ComponentTestEntity ver3 = new ComponentTestEntity(id1, new Component1("c"));
-
-        assert getAuditReader().find(ComponentTestEntity.class, id1, 1).equals(ver1);
-        assert getAuditReader().find(ComponentTestEntity.class, id1, 2).equals(ver2);
-        assert getAuditReader().find(ComponentTestEntity.class, id1, 3).equals(ver3);
-    }
-}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/components/InterfacesComponents.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,95 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.integration.interfaces.components;
+
+import java.util.Arrays;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class InterfacesComponents extends AbstractEntityTest {
+    private Integer id1;
+
+    public void configure(Ejb3Configuration cfg) {
+        cfg.addAnnotatedClass(ComponentTestEntity.class);
+    }
+
+    @BeforeClass(dependsOnMethods = "init")
+    public void initData() {
+        // Revision 1
+        EntityManager em = getEntityManager();
+        em.getTransaction().begin();
+
+        ComponentTestEntity cte1 = new ComponentTestEntity(new Component1("a"));
+
+        em.persist(cte1);
+
+        em.getTransaction().commit();
+
+        // Revision 2
+        em = getEntityManager();
+        em.getTransaction().begin();
+
+        cte1 = em.find(ComponentTestEntity.class, cte1.getId());
+
+        cte1.setComp1(new Component1("b"));
+
+        em.getTransaction().commit();
+
+        // Revision 3
+        em = getEntityManager();
+        em.getTransaction().begin();
+
+        cte1 = em.find(ComponentTestEntity.class, cte1.getId());
+
+        cte1.getComp1().setData("c");
+
+        em.getTransaction().commit();
+
+        id1 = cte1.getId();
+    }
+
+    @Test
+    public void testRevisionsCounts() {
+        assert Arrays.asList(1, 2, 3).equals(getAuditReader().getRevisions(ComponentTestEntity.class, id1));
+    }
+
+    @Test
+    public void testHistoryOfId1() {
+        ComponentTestEntity ver1 = new ComponentTestEntity(id1, new Component1("a"));
+		ComponentTestEntity ver2 = new ComponentTestEntity(id1, new Component1("b"));
+		ComponentTestEntity ver3 = new ComponentTestEntity(id1, new Component1("c"));
+
+        assert getAuditReader().find(ComponentTestEntity.class, id1, 1).equals(ver1);
+        assert getAuditReader().find(ComponentTestEntity.class, id1, 2).equals(ver2);
+        assert getAuditReader().find(ComponentTestEntity.class, id1, 3).equals(ver3);
+    }
+}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation)

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,14 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.relation;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
-public interface ISetRefEdEntity {
-	Integer getId();
-
-	void setId(Integer id);
-
-	String getData();
-
-	void setData(String data);
-}

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/ISetRefEdEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,14 @@
+package org.hibernate.envers.test.integration.interfaces.relation;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public interface ISetRefEdEntity {
+	Integer getId();
+
+	void setId(Integer id);
+
+	String getData();
+
+	void setData(String data);
+}

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,116 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- */
-package org.hibernate.envers.test.integration.interfaces.relation;
-
-import java.util.Arrays;
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import org.hibernate.ejb.Ejb3Configuration;
-
-/**
- * @author Adam Warski (adam at warski dot org)
- */
-public class InterfacesRelation extends AbstractEntityTest {
-    private Integer ed1_id;
-    private Integer ed2_id;
-
-    private Integer ing1_id;
-
-    public void configure(Ejb3Configuration cfg) {
-        cfg.addAnnotatedClass(SetRefEdEntity.class);
-        cfg.addAnnotatedClass(SetRefIngEntity.class);
-    }
-
-    @BeforeClass(dependsOnMethods = "init")
-    public void initData() {
-        EntityManager em = getEntityManager();
-
-        SetRefEdEntity ed1 = new SetRefEdEntity(1, "data_ed_1");
-        SetRefEdEntity ed2 = new SetRefEdEntity(2, "data_ed_2");
-
-        SetRefIngEntity ing1 = new SetRefIngEntity(3, "data_ing_1");
-
-        // Revision 1
-        em.getTransaction().begin();
-
-        em.persist(ed1);
-        em.persist(ed2);
-
-        em.getTransaction().commit();
-
-        // Revision 2
-
-        em.getTransaction().begin();
-
-        ed1 = em.find(SetRefEdEntity.class, ed1.getId());
-
-        ing1.setReference(ed1);
-        em.persist(ing1);
-
-        em.getTransaction().commit();
-
-        // Revision 3
-        em.getTransaction().begin();
-
-        ing1 = em.find(SetRefIngEntity.class, ing1.getId());
-        ed2 = em.find(SetRefEdEntity.class, ed2.getId());
-
-        ing1.setReference(ed2);
-
-        em.getTransaction().commit();
-
-        //
-
-        ed1_id = ed1.getId();
-        ed2_id = ed2.getId();
-
-        ing1_id = ing1.getId();
-    }
-
-    @Test
-    public void testRevisionsCounts() {
-        assert Arrays.asList(1).equals(getAuditReader().getRevisions(SetRefEdEntity.class, ed1_id));
-        assert Arrays.asList(1).equals(getAuditReader().getRevisions(SetRefEdEntity.class, ed2_id));
-
-        assert Arrays.asList(2, 3).equals(getAuditReader().getRevisions(SetRefIngEntity.class, ing1_id));
-    }
-
-    @Test
-    public void testHistoryOfEdIng1() {
-        SetRefEdEntity ed1 = getEntityManager().find(SetRefEdEntity.class, ed1_id);
-        SetRefEdEntity ed2 = getEntityManager().find(SetRefEdEntity.class, ed2_id);
-
-        SetRefIngEntity rev1 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 1);
-        SetRefIngEntity rev2 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 2);
-        SetRefIngEntity rev3 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 3);
-
-        assert rev1 == null;
-        assert rev2.getReference().equals(ed1);
-        assert rev3.getReference().equals(ed2);
-    }
-}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/InterfacesRelation.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,116 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.integration.interfaces.relation;
+
+import java.util.Arrays;
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import org.hibernate.ejb.Ejb3Configuration;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ */
+public class InterfacesRelation extends AbstractEntityTest {
+    private Integer ed1_id;
+    private Integer ed2_id;
+
+    private Integer ing1_id;
+
+    public void configure(Ejb3Configuration cfg) {
+        cfg.addAnnotatedClass(SetRefEdEntity.class);
+        cfg.addAnnotatedClass(SetRefIngEntity.class);
+    }
+
+    @BeforeClass(dependsOnMethods = "init")
+    public void initData() {
+        EntityManager em = getEntityManager();
+
+        SetRefEdEntity ed1 = new SetRefEdEntity(1, "data_ed_1");
+        SetRefEdEntity ed2 = new SetRefEdEntity(2, "data_ed_2");
+
+        SetRefIngEntity ing1 = new SetRefIngEntity(3, "data_ing_1");
+
+        // Revision 1
+        em.getTransaction().begin();
+
+        em.persist(ed1);
+        em.persist(ed2);
+
+        em.getTransaction().commit();
+
+        // Revision 2
+
+        em.getTransaction().begin();
+
+        ed1 = em.find(SetRefEdEntity.class, ed1.getId());
+
+        ing1.setReference(ed1);
+        em.persist(ing1);
+
+        em.getTransaction().commit();
+
+        // Revision 3
+        em.getTransaction().begin();
+
+        ing1 = em.find(SetRefIngEntity.class, ing1.getId());
+        ed2 = em.find(SetRefEdEntity.class, ed2.getId());
+
+        ing1.setReference(ed2);
+
+        em.getTransaction().commit();
+
+        //
+
+        ed1_id = ed1.getId();
+        ed2_id = ed2.getId();
+
+        ing1_id = ing1.getId();
+    }
+
+    @Test
+    public void testRevisionsCounts() {
+        assert Arrays.asList(1).equals(getAuditReader().getRevisions(SetRefEdEntity.class, ed1_id));
+        assert Arrays.asList(1).equals(getAuditReader().getRevisions(SetRefEdEntity.class, ed2_id));
+
+        assert Arrays.asList(2, 3).equals(getAuditReader().getRevisions(SetRefIngEntity.class, ing1_id));
+    }
+
+    @Test
+    public void testHistoryOfEdIng1() {
+        SetRefEdEntity ed1 = getEntityManager().find(SetRefEdEntity.class, ed1_id);
+        SetRefEdEntity ed2 = getEntityManager().find(SetRefEdEntity.class, ed2_id);
+
+        SetRefIngEntity rev1 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 1);
+        SetRefIngEntity rev2 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 2);
+        SetRefIngEntity rev3 = getAuditReader().find(SetRefIngEntity.class, ing1_id, 3);
+
+        assert rev1 == null;
+        assert rev2.getReference().equals(ed1);
+        assert rev3.getReference().equals(ed2);
+    }
+}
\ No newline at end of file

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,93 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- */
-package org.hibernate.envers.test.integration.interfaces.relation;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-import org.hibernate.envers.Audited;
-
-/**
- * ReferencEd entity
- * @author Adam Warski (adam at warski dot org)
- */
- at Entity
- at Audited
-public class SetRefEdEntity implements ISetRefEdEntity {
-    @Id
-    private Integer id;
-
-    private String data;
-
-    public SetRefEdEntity() {
-    }
-
-    public SetRefEdEntity(Integer id, String data) {
-        this.id = id;
-        this.data = data;
-    }
-
-    public SetRefEdEntity(String data) {
-        this.data = data;
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getData() {
-        return data;
-    }
-
-    public void setData(String data) {
-        this.data = data;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof SetRefEdEntity)) return false;
-
-        SetRefEdEntity that = (SetRefEdEntity) o;
-
-        if (data != null ? !data.equals(that.data) : that.data != null) return false;
-        if (id != null ? !id.equals(that.id) : that.id != null) return false;
-
-        return true;
-    }
-
-    public int hashCode() {
-        int result;
-        result = (id != null ? id.hashCode() : 0);
-        result = 31 * result + (data != null ? data.hashCode() : 0);
-        return result;
-    }
-
-    public String toString() {
-        return "SetRefEdEntity(id = " + id + ", data = " + data + ")";
-    }
-}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefEdEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,93 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.integration.interfaces.relation;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * ReferencEd entity
+ * @author Adam Warski (adam at warski dot org)
+ */
+ at Entity
+ at Audited
+public class SetRefEdEntity implements ISetRefEdEntity {
+    @Id
+    private Integer id;
+
+    private String data;
+
+    public SetRefEdEntity() {
+    }
+
+    public SetRefEdEntity(Integer id, String data) {
+        this.id = id;
+        this.data = data;
+    }
+
+    public SetRefEdEntity(String data) {
+        this.data = data;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SetRefEdEntity)) return false;
+
+        SetRefEdEntity that = (SetRefEdEntity) o;
+
+        if (data != null ? !data.equals(that.data) : that.data != null) return false;
+        if (id != null ? !id.equals(that.id) : that.id != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        int result;
+        result = (id != null ? id.hashCode() : 0);
+        result = 31 * result + (data != null ? data.hashCode() : 0);
+        return result;
+    }
+
+    public String toString() {
+        return "SetRefEdEntity(id = " + id + ", data = " + data + ")";
+    }
+}
\ No newline at end of file

Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -1,112 +0,0 @@
-/*
- * Hibernate, Relational Persistence for Idiomatic Java
- *
- * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
- * indicated by the @author tags or express copyright attribution
- * statements applied by the authors.  All third-party contributions are
- * distributed under license by Red Hat Middleware LLC.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this distribution; if not, write to:
- * Free Software Foundation, Inc.
- * 51 Franklin Street, Fifth Floor
- * Boston, MA  02110-1301  USA
- */
-package org.hibernate.envers.test.integration.interfaces.relation;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-
-import org.hibernate.envers.Audited;
-
-/**
- * ReferencIng entity
- * @author Adam Warski (adam at warski dot org)
- */
- at Entity
-public class SetRefIngEntity {
-    @Id
-    private Integer id;
-
-    @Audited
-    private String data;
-
-    @Audited
-    @ManyToOne(targetEntity = SetRefEdEntity.class)
-    private ISetRefEdEntity reference;
-
-    public SetRefIngEntity() { }
-
-    public SetRefIngEntity(Integer id, String data, ISetRefEdEntity reference) {
-        this.id = id;
-        this.data = data;
-        this.reference = reference;
-    }
-
-    public SetRefIngEntity(String data, ISetRefEdEntity reference) {
-        this.data = data;
-        this.reference = reference;
-    }
-
-    public SetRefIngEntity(Integer id, String data) {
-        this.id = id;
-        this.data = data;
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getData() {
-        return data;
-    }
-
-    public void setData(String data) {
-        this.data = data;
-    }
-
-    public ISetRefEdEntity getReference() {
-        return reference;
-    }
-
-    public void setReference(ISetRefEdEntity reference) {
-        this.reference = reference;
-    }
-
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof SetRefIngEntity)) return false;
-
-        SetRefIngEntity that = (SetRefIngEntity) o;
-
-        if (data != null ? !data.equals(that.data) : that.data != null) return false;
-        if (id != null ? !id.equals(that.id) : that.id != null) return false;
-
-        return true;
-    }
-
-    public int hashCode() {
-        int result;
-        result = (id != null ? id.hashCode() : 0);
-        result = 31 * result + (data != null ? data.hashCode() : 0);
-        return result;
-    }
-
-    public String toString() {
-        return "SetRefIngEntity(id = " + id + ", data = " + data + ")";
-    }
-}
\ No newline at end of file

Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java (from rev 16062, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java	                        (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/relation/SetRefIngEntity.java	2009-03-03 16:54:21 UTC (rev 16063)
@@ -0,0 +1,112 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors.  All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.envers.test.integration.interfaces.relation;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * ReferencIng entity
+ * @author Adam Warski (adam at warski dot org)
+ */
+ at Entity
+public class SetRefIngEntity {
+    @Id
+    private Integer id;
+
+    @Audited
+    private String data;
+
+    @Audited
+    @ManyToOne(targetEntity = SetRefEdEntity.class)
+    private ISetRefEdEntity reference;
+
+    public SetRefIngEntity() { }
+
+    public SetRefIngEntity(Integer id, String data, ISetRefEdEntity reference) {
+        this.id = id;
+        this.data = data;
+        this.reference = reference;
+    }
+
+    public SetRefIngEntity(String data, ISetRefEdEntity reference) {
+        this.data = data;
+        this.reference = reference;
+    }
+
+    public SetRefIngEntity(Integer id, String data) {
+        this.id = id;
+        this.data = data;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+
+    public ISetRefEdEntity getReference() {
+        return reference;
+    }
+
+    public void setReference(ISetRefEdEntity reference) {
+        this.reference = reference;
+    }
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof SetRefIngEntity)) return false;
+
+        SetRefIngEntity that = (SetRefIngEntity) o;
+
+        if (data != null ? !data.equals(that.data) : that.data != null) return false;
+        if (id != null ? !id.equals(that.id) : that.id != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        int result;
+        result = (id != null ? id.hashCode() : 0);
+        result = 31 * result + (data != null ? data.hashCode() : 0);
+        return result;
+    }
+
+    public String toString() {
+        return "SetRefIngEntity(id = " + id + ", data = " + data + ")";
+    }
+}
\ No newline at end of file

Modified: core/branches/envers-hibernate-3.3/src/test/resources/testng.xml
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/testng.xml	2009-03-03 16:10:51 UTC (rev 16062)
+++ core/branches/envers-hibernate-3.3/src/test/resources/testng.xml	2009-03-03 16:54:21 UTC (rev 16063)
@@ -28,6 +28,8 @@
             <package name="org.hibernate.envers.test.integration.inheritance.tableperclass.childrelation" />
             <package name="org.hibernate.envers.test.integration.inheritance.tableperclass.notownedrelation" />
             <package name="org.hibernate.envers.test.integration.inheritance.tableperclass.relation" />
+            <package name="org.hibernate.envers.test.integration.interfaces.components" />
+            <package name="org.hibernate.envers.test.integration.interfaces.relation" />
             <package name="org.hibernate.envers.test.integration.manytomany" />
             <package name="org.hibernate.envers.test.integration.manytomany.ternary" />
             <package name="org.hibernate.envers.test.integration.manytomany.unidirectional" />




More information about the hibernate-commits mailing list