Hibernate SVN: r18433 - in core/trunk/annotations/src: test/java/org/hibernate/test/annotations/collectionelement and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2010-01-07 12:33:23 -0500 (Thu, 07 Jan 2010)
New Revision: 18433
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java
core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/SimpleValueBinder.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Matrix.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/Atmosphere.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java
Log:
HHH-4687 implement @MapKeyTemporal
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java 2010-01-07 14:51:20 UTC (rev 18432)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/MapBinder.java 2010-01-07 17:33:23 UTC (rev 18433)
@@ -271,9 +271,13 @@
//do not call setType as it extract the type from @Type
//the algorithm generally does not apply for map key anyway
MapKey mapKeyAnn = property.getAnnotation( org.hibernate.annotations.MapKey.class );
+ elementBinder.setKey(true);
if (mapKeyAnn != null && ! BinderHelper.isDefault( mapKeyAnn.type().type() ) ) {
elementBinder.setExplicitType( mapKeyAnn.type() );
}
+ else {
+ elementBinder.setType( property, elementClass );
+ }
mapValue.setIndex( elementBinder.make() );
}
}
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/SimpleValueBinder.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/SimpleValueBinder.java 2010-01-07 14:51:20 UTC (rev 18432)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/annotations/SimpleValueBinder.java 2010-01-07 17:33:23 UTC (rev 18433)
@@ -30,7 +30,9 @@
import java.util.Properties;
import javax.persistence.Enumerated;
import javax.persistence.Lob;
+import javax.persistence.MapKeyTemporal;
import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
@@ -70,6 +72,8 @@
private Table table;
private SimpleValue simpleValue;
private boolean isVersion;
+ //is a Map key
+ private boolean key;
public boolean isVersion() {
return isVersion;
@@ -112,8 +116,9 @@
Properties typeParameters = this.typeParameters;
typeParameters.clear();
String type = BinderHelper.ANNOTATION_STRING_DEFAULT;
- if ( property.isAnnotationPresent( Temporal.class ) ) {
- Temporal ann = property.getAnnotation( Temporal.class );
+ if ( (!key && property.isAnnotationPresent( Temporal.class ) )
+ || (key && property.isAnnotationPresent( MapKeyTemporal.class ) )) {
+
boolean isDate;
if ( mappings.getReflectionManager().equals( returnedClassOrElement, Date.class ) ) {
isDate = true;
@@ -127,8 +132,8 @@
+ StringHelper.qualify( persistentClassName, propertyName )
);
}
-
- switch ( ann.value() ) {
+ final TemporalType temporalType = getTemporalType( property );
+ switch ( temporalType ) {
case DATE:
type = isDate ? "date" : "calendar_date";
break;
@@ -145,7 +150,7 @@
type = isDate ? "timestamp" : "calendar";
break;
default:
- throw new AssertionFailure( "Unknown temporal type: " + ann.value() );
+ throw new AssertionFailure( "Unknown temporal type: " + temporalType );
}
}
else if ( property.isAnnotationPresent( Lob.class ) ) {
@@ -219,10 +224,21 @@
}
explicitType = type;
this.typeParameters = typeParameters;
- Type annType = (Type) property.getAnnotation( Type.class );
+ Type annType = property.getAnnotation( Type.class );
setExplicitType( annType );
}
+ private TemporalType getTemporalType(XProperty property) {
+ if (key) {
+ MapKeyTemporal ann = property.getAnnotation( MapKeyTemporal.class );
+ return ann.value();
+ }
+ else {
+ Temporal ann = property.getAnnotation( Temporal.class );
+ return ann.value();
+ }
+ }
+
public void setExplicitType(String explicitType) {
this.explicitType = explicitType;
}
@@ -297,4 +313,8 @@
}
}
+
+ public void setKey(boolean key) {
+ this.key = key;
+ }
}
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java 2010-01-07 14:51:20 UTC (rev 18432)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java 2010-01-07 17:33:23 UTC (rev 18433)
@@ -14,7 +14,6 @@
import org.hibernate.mapping.Column;
import org.hibernate.test.annotations.Country;
import org.hibernate.test.annotations.TestCase;
-import org.hibernate.util.StringHelper;
/**
* @author Emmanuel Bernard
@@ -204,14 +203,14 @@
public void testMapKeyType() throws Exception {
Matrix m = new Matrix();
- m.getValues().put( 1, 1.1f );
+ m.getMvalues().put( 1, 1.1f );
Session s = openSession();
Transaction tx = s.beginTransaction();
s.persist( m );
s.flush();
s.clear();
m = (Matrix) s.get( Matrix.class, m.getId() );
- assertEquals( 1.1f, m.getValues().get( 1 ) );
+ assertEquals( 1.1f, m.getMvalues().get( 1 ) );
tx.rollback();
s.close();
}
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Matrix.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Matrix.java 2010-01-07 14:51:20 UTC (rev 18432)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Matrix.java 2010-01-07 17:33:23 UTC (rev 18433)
@@ -27,7 +27,7 @@
@ElementCollection
@Sort(type = SortType.NATURAL)
@Type(type = "float")
- private SortedMap<Integer, Float> values = new TreeMap<Integer, Float>();
+ private SortedMap<Integer, Float> mvalues = new TreeMap<Integer, Float>();
public Integer getId() {
return id;
@@ -37,11 +37,11 @@
this.id = id;
}
- public Map<Integer, Float> getValues() {
- return values;
+ public Map<Integer, Float> getMvalues() {
+ return mvalues;
}
- public void setValues(SortedMap<Integer, Float> values) {
- this.values = values;
+ public void setMvalues(SortedMap<Integer, Float> mValues) {
+ this.mvalues = mValues;
}
}
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/Atmosphere.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/Atmosphere.java 2010-01-07 14:51:20 UTC (rev 18432)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/Atmosphere.java 2010-01-07 17:33:23 UTC (rev 18433)
@@ -1,9 +1,11 @@
//$Id$
package org.hibernate.test.annotations.indexcoll;
+import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import javax.persistence.CascadeType;
+import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@@ -13,6 +15,8 @@
import javax.persistence.JoinColumn;
import javax.persistence.MapKeyColumn;
import javax.persistence.MapKeyJoinColumn;
+import javax.persistence.MapKeyTemporal;
+import javax.persistence.TemporalType;
import org.hibernate.annotations.MapKey;
import org.hibernate.annotations.CollectionOfElements;
@@ -30,6 +34,10 @@
@MapKeyColumn(name="gas_name")
public Map<String, Gas> gases = new HashMap<String, Gas>();
+ @MapKeyTemporal(TemporalType.DATE)
+ @ElementCollection
+ public Map<Date, String> colorPerDate = new HashMap<Date,String>();
+
@ManyToMany(cascade = CascadeType.ALL)
@MapKeyJoinColumn(name="gas_id" )
@JoinTable(name = "Gas_per_key")
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java 2010-01-07 14:51:20 UTC (rev 18432)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java 2010-01-07 17:33:23 UTC (rev 18433)
@@ -2,6 +2,7 @@
package org.hibernate.test.annotations.indexcoll;
import java.util.ArrayList;
+import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -442,6 +443,25 @@
s.close();
}
+ public void testTemporalKeyMap() throws Exception {
+ Session s = openSession();
+ Transaction tx = s.beginTransaction();
+ Atmosphere atm = new Atmosphere();
+ atm.colorPerDate.put( new Date(1234567000), "red" );
+ s.persist( atm );
+
+ s.flush();
+ s.clear();
+
+ atm = (Atmosphere) s.get( Atmosphere.class, atm.id );
+ assertEquals( 1, atm.colorPerDate.size() );
+ final Date date = atm.colorPerDate.keySet().iterator().next();
+ final long diff = new Date( 1234567000 ).getTime() - date.getTime();
+ assertTrue( "24h diff max", diff > 0 && diff < 24*60*60*1000 );
+ tx.rollback();
+ s.close();
+ }
+
public void testMapKeyEntityEntity() throws Exception {
Session s = openSession();
Transaction tx = s.beginTransaction();
14 years, 11 months
Hibernate SVN: r18432 - in core/branches/envers-hibernate-3.3/src: test/java/org/hibernate/envers/test/integration/interfaces and 16 other directories.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2010-01-07 09:51:20 -0500 (Thu, 07 Jan 2010)
New Revision: 18432
Added:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/resources/mappings/
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
Removed:
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/
core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
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/test/resources/testng.xml
Log:
svn merge -r 18239:18431 https://svn.jboss.org/repos/hibernate/core/trunk/envers .
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 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -81,7 +81,7 @@
private void addPropertiesFromClass(XClass clazz) {
XClass superclazz = clazz.getSuperclass();
- if (!"java.lang.Object".equals(superclazz.getName())) {
+ if (!clazz.isInterface() && !"java.lang.Object".equals(superclazz.getName())) {
addPropertiesFromClass(superclazz);
}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm)
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,122 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.exception.NotAuditedException;
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-import org.testng.Assert;
-
-import java.util.Arrays;
-
-/**
- * @author Hern�n Chanfreau
- * @author Adam Warski (adam at warski dot org)
- */
-public abstract class AbstractAllAuditedTest extends AbstractEntityTest {
-
- private long ai_id;
- private long nai_id;
-
- @BeforeClass(dependsOnMethods = "init")
- public void initData() {
- EntityManager em = getEntityManager();
-
- AuditedImplementor ai = new AuditedImplementor();
- ai.setData("La data");
- ai.setAuditedImplementorData("audited implementor data");
-
- NonAuditedImplementor nai = new NonAuditedImplementor();
- nai.setData("info");
- nai.setNonAuditedImplementorData("sttring");
-
- // Revision 1
- em.getTransaction().begin();
-
- em.persist(ai);
-
- em.persist(nai);
-
- em.getTransaction().commit();
-
- // Revision 2
- em.getTransaction().begin();
-
- ai = em.find(AuditedImplementor.class, ai.getId());
- nai = em.find(NonAuditedImplementor.class, nai.getId());
-
- ai.setData("La data 2");
- ai.setAuditedImplementorData("audited implementor data 2");
-
- nai.setData("info 2");
- nai.setNonAuditedImplementorData("sttring 2");
-
- em.getTransaction().commit();
-
- //
-
- ai_id = ai.getId();
- nai_id = nai.getId();
- }
-
- @Test
- public void testRevisions() {
- Assert.assertEquals(getAuditReader().getRevisions(AuditedImplementor.class, ai_id), Arrays.asList(1, 2));
- }
-
- @Test
- public void testRetrieveAudited() {
- // levanto las versiones actuales
- AuditedImplementor ai = getEntityManager().find(AuditedImplementor.class, ai_id);
- assert ai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class, ai_id);
- assert si != null;
-
- // levanto las de la revisi�n 1, ninguna debe ser null
- AuditedImplementor ai_rev1 = getAuditReader().find(AuditedImplementor.class, ai_id, 1);
- assert ai_rev1 != null;
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, ai_id, 1);
- assert si_rev1 != null;
-
- AuditedImplementor ai_rev2 = getAuditReader().find(AuditedImplementor.class, ai_id, 2);
- assert ai_rev2 != null;
- SimpleInterface si_rev2 = getAuditReader().find(SimpleInterface.class, ai_id, 2);
- assert si_rev2 != null;
-
- // data de las actuales no debe ser null
- Assert.assertEquals(ai.getData(), "La data 2");
- Assert.assertEquals(si.getData(), "La data 2");
- // la data de las revisiones no debe ser null
- Assert.assertEquals(ai_rev1.getData(), "La data");
- Assert.assertEquals(si_rev1.getData(), "La data");
-
- Assert.assertEquals(ai_rev2.getData(), "La data 2");
- Assert.assertEquals(si_rev2.getData(), "La data 2");
- }
-
- @Test
- public void testRetrieveNonAudited() {
- // levanto las versiones actuales
- NonAuditedImplementor nai = getEntityManager().find(NonAuditedImplementor.class, nai_id);
- assert nai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class, nai_id);
- assert si != null;
-
- assert si.getData().equals(nai.getData());
-
- try {
- // levanto la revision
- getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
- assert false;
- } catch (Exception e) {
- // no es auditable!!!
- assert (e instanceof NotAuditedException);
- }
-
- // levanto la revision que no es auditable pero con la interfaz, el resultado debe ser null
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, nai_id, 1);
- assert si_rev1 == null;
-
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,122 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import org.testng.Assert;
+
+import java.util.Arrays;
+
+/**
+ * @author Hern�n Chanfreau
+ * @author Adam Warski (adam at warski dot org)
+ */
+public abstract class AbstractAllAuditedTest extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+ em.getTransaction().begin();
+
+ ai = em.find(AuditedImplementor.class, ai.getId());
+ nai = em.find(NonAuditedImplementor.class, nai.getId());
+
+ ai.setData("La data 2");
+ ai.setAuditedImplementorData("audited implementor data 2");
+
+ nai.setData("info 2");
+ nai.setNonAuditedImplementorData("sttring 2");
+
+ em.getTransaction().commit();
+
+ //
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRevisions() {
+ Assert.assertEquals(getAuditReader().getRevisions(AuditedImplementor.class, ai_id), Arrays.asList(1, 2));
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class, ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(AuditedImplementor.class, ai_id, 1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, ai_id, 1);
+ assert si_rev1 != null;
+
+ AuditedImplementor ai_rev2 = getAuditReader().find(AuditedImplementor.class, ai_id, 2);
+ assert ai_rev2 != null;
+ SimpleInterface si_rev2 = getAuditReader().find(SimpleInterface.class, ai_id, 2);
+ assert si_rev2 != null;
+
+ // data de las actuales no debe ser null
+ Assert.assertEquals(ai.getData(), "La data 2");
+ Assert.assertEquals(si.getData(), "La data 2");
+ // la data de las revisiones no debe ser null
+ Assert.assertEquals(ai_rev1.getData(), "La data");
+ Assert.assertEquals(si_rev1.getData(), "La data");
+
+ Assert.assertEquals(ai_rev2.getData(), "La data 2");
+ Assert.assertEquals(si_rev2.getData(), "La data 2");
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(NonAuditedImplementor.class, nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class, nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el resultado debe ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, nai_id, 1);
+ assert si_rev1 == null;
+
+ }
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,47 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-@Audited
-public class AuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String auditedImplementorData;
-
-
- protected AuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getAuditedImplementorData() {
- return auditedImplementorData;
- }
-
- public void setAuditedImplementorData(String implementorData) {
- this.auditedImplementorData = implementorData;
- }
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,47 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,45 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
-
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-public class NonAuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String nonAuditedImplementorData;
-
-
- protected NonAuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getNonAuditedImplementorData() {
- return nonAuditedImplementorData;
- }
-
- public void setNonAuditedImplementorData(String implementorData) {
- this.nonAuditedImplementorData = implementorData;
- }
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,45 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,20 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-@Audited
-public interface SimpleInterface {
-
- long getId();
-
- void setId(long id);
-
- String getData();
-
- void setData(String data);
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,20 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+@Audited
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ String getData();
+
+ void setData(String data);
+
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,43 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.joined;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-public class JoinedAllAuditedTest extends AbstractAllAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedAllAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- @Override
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
- @Test
- @Override
- public void testRetrieveNonAudited() {
- super.testRetrieveNonAudited();
- }
-
- @Test
- @Override
- public void testRevisions() {
- super.testRevisions();
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,43 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class JoinedAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,44 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.subclass;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-public class SubclassAllAuditedTest extends AbstractAllAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassAllAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- @Override
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
- @Test
- @Override
- public void testRetrieveNonAudited() {
- super.testRetrieveNonAudited();
- }
-
- @Test
- @Override
- public void testRevisions() {
- super.testRevisions();
- }
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,44 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class SubclassAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,43 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.union;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-public class UnionAllAuditedTest extends AbstractAllAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionAllAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- @Override
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
- @Test
- @Override
- public void testRetrieveNonAudited() {
- super.testRetrieveNonAudited();
- }
-
- @Test
- @Override
- public void testRevisions() {
- super.testRevisions();
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,43 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class UnionAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,109 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.exception.NotAuditedException;
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public abstract class AbstractPropertiesAuditedTest extends AbstractEntityTest {
-
- private long ai_id;
- private long nai_id;
-
- private static int NUMERITO = 555;
-
- @BeforeClass(dependsOnMethods = "init")
- public void initData() {
- EntityManager em = getEntityManager();
-
- AuditedImplementor ai = new AuditedImplementor();
- ai.setData("La data");
- ai.setAuditedImplementorData("audited implementor data");
- ai.setNumerito(NUMERITO);
-
- NonAuditedImplementor nai = new NonAuditedImplementor();
- nai.setData("info");
- nai.setNonAuditedImplementorData("sttring");
- nai.setNumerito(NUMERITO);
-
- // Revision 1
- em.getTransaction().begin();
-
- em.persist(ai);
-
- em.persist(nai);
-
- em.getTransaction().commit();
-
- // Revision 2
-
- // Revision 3
-
- ai_id = ai.getId();
- nai_id = nai.getId();
- }
-
- @Test
- public void testRetrieveAudited() {
- // levanto las versiones actuales
- AuditedImplementor ai = getEntityManager().find(
- AuditedImplementor.class, ai_id);
- assert ai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class,
- ai_id);
- assert si != null;
-
- // levanto las de la revisi�n 1, ninguna debe ser null
- AuditedImplementor ai_rev1 = getAuditReader().find(
- AuditedImplementor.class, ai_id, 1);
- assert ai_rev1 != null;
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
- ai_id, 1);
- assert si_rev1 != null;
-
- // data de las actuales no debe ser null
- assert ai.getData() != null;
- assert si.getData() != null;
- // data de las revisiones No est� auditada
- assert ai_rev1.getData() == null;
- assert si_rev1.getData() == null;
- // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
- assert ai_rev1.getNumerito() == NUMERITO;
- assert si_rev1.getNumerito() == NUMERITO;
- }
-
- @Test
- public void testRetrieveNonAudited() {
- // levanto las versiones actuales
- NonAuditedImplementor nai = getEntityManager().find(
- NonAuditedImplementor.class, nai_id);
- assert nai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class,
- nai_id);
- assert si != null;
-
- assert si.getData().equals(nai.getData());
-
- try {
- // levanto la revision
- getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
- assert false;
- } catch (Exception e) {
- // no es auditable!!!
- assert (e instanceof NotAuditedException);
- }
-
- // levanto la revision que no es auditable pero con la interfaz, el
- // resultado debe ser null
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
- nai_id, 1);
- assert si_rev1 == null;
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,109 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public abstract class AbstractPropertiesAuditedTest extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ private static int NUMERITO = 555;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+ ai.setNumerito(NUMERITO);
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+ nai.setNumerito(NUMERITO);
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+
+ // Revision 3
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(
+ AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(
+ AuditedImplementor.class, ai_id, 1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ ai_id, 1);
+ assert si_rev1 != null;
+
+ // data de las actuales no debe ser null
+ assert ai.getData() != null;
+ assert si.getData() != null;
+ // data de las revisiones No est� auditada
+ assert ai_rev1.getData() == null;
+ assert si_rev1.getData() == null;
+ // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
+ assert ai_rev1.getNumerito() == NUMERITO;
+ assert si_rev1.getNumerito() == NUMERITO;
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(
+ NonAuditedImplementor.class, nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el
+ // resultado debe ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ nai_id, 1);
+ assert si_rev1 == null;
+ }
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,58 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-@Audited
-public class AuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String auditedImplementorData;
-
- private int numerito;
-
-
- protected AuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getAuditedImplementorData() {
- return auditedImplementorData;
- }
-
- public void setAuditedImplementorData(String implementorData) {
- this.auditedImplementorData = implementorData;
- }
-
- public int getNumerito() {
- return numerito;
- }
-
- public void setNumerito(int numerito) {
- this.numerito = numerito;
- }
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,58 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+ private int numerito;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,54 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class NonAuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String nonAuditedImplementorData;
-
- private int numerito;
-
-
- protected NonAuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getNonAuditedImplementorData() {
- return nonAuditedImplementorData;
- }
-
- public void setNonAuditedImplementorData(String implementorData) {
- this.nonAuditedImplementorData = implementorData;
- }
-
- public int getNumerito() {
- return numerito;
- }
-
- public void setNumerito(int numerito) {
- this.numerito = numerito;
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,54 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+ private int numerito;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,25 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public interface SimpleInterface {
-
- long getId();
-
- void setId(long id);
-
- String getData();
-
- void setData(String data);
-
- @Audited
- int getNumerito();
-
- void setNumerito(int num);
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,25 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ String getData();
+
+ void setData(String data);
+
+ @Audited
+ int getNumerito();
+
+ void setNumerito(int num);
+
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,31 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.joined;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class JoinedPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class JoinedPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,33 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.subclass;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class SubclassPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,33 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class SubclassPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,31 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.union;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class UnionPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class UnionPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2 (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,109 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
-
-import javax.persistence.EntityManager;
-
-import org.hibernate.envers.exception.NotAuditedException;
-import org.hibernate.envers.test.AbstractEntityTest;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public abstract class AbstractPropertiesAudited2Test extends AbstractEntityTest {
-
- private long ai_id;
- private long nai_id;
-
- private static int NUMERITO = 555;
-
- @BeforeClass(dependsOnMethods = "init")
- public void initData() {
- EntityManager em = getEntityManager();
-
- AuditedImplementor ai = new AuditedImplementor();
- ai.setData("La data");
- ai.setAuditedImplementorData("audited implementor data");
- ai.setNumerito(NUMERITO);
-
- NonAuditedImplementor nai = new NonAuditedImplementor();
- nai.setData("info");
- nai.setNonAuditedImplementorData("sttring");
- nai.setNumerito(NUMERITO);
-
- // Revision 1
- em.getTransaction().begin();
-
- em.persist(ai);
-
- em.persist(nai);
-
- em.getTransaction().commit();
-
- // Revision 2
-
- // Revision 3
-
- ai_id = ai.getId();
- nai_id = nai.getId();
- }
-
- @Test
- public void testRetrieveAudited() {
- // levanto las versiones actuales
- AuditedImplementor ai = getEntityManager().find(
- AuditedImplementor.class, ai_id);
- assert ai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class,
- ai_id);
- assert si != null;
-
- // levanto las de la revisi�n 1, ninguna debe ser null
- AuditedImplementor ai_rev1 = getAuditReader().find(
- AuditedImplementor.class, ai_id, 1);
- assert ai_rev1 != null;
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
- ai_id, 1);
- assert si_rev1 != null;
-
- // data de las actuales no debe ser null
- assert ai.getData() != null;
- assert si.getData() != null;
- // data de las revisiones est� auditada
- assert ai_rev1.getData() != null;
- assert si_rev1.getData() != null;
- // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
- assert ai_rev1.getNumerito() == NUMERITO;
- assert si_rev1.getNumerito() == NUMERITO;
- }
-
- @Test
- public void testRetrieveNonAudited() {
- // levanto las versiones actuales
- NonAuditedImplementor nai = getEntityManager().find(
- NonAuditedImplementor.class, nai_id);
- assert nai != null;
- SimpleInterface si = getEntityManager().find(SimpleInterface.class,
- nai_id);
- assert si != null;
-
- assert si.getData().equals(nai.getData());
-
- try {
- // levanto la revision
- getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
- assert false;
- } catch (Exception e) {
- // no es auditable!!!
- assert (e instanceof NotAuditedException);
- }
-
- // levanto la revision que no es auditable pero con la interfaz, el
- // resultado debe ser null
- SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
- nai_id, 1);
- assert si_rev1 == null;
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,109 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public abstract class AbstractPropertiesAudited2Test extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ private static int NUMERITO = 555;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+ ai.setNumerito(NUMERITO);
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+ nai.setNumerito(NUMERITO);
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+
+ // Revision 3
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(
+ AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(
+ AuditedImplementor.class, ai_id, 1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ ai_id, 1);
+ assert si_rev1 != null;
+
+ // data de las actuales no debe ser null
+ assert ai.getData() != null;
+ assert si.getData() != null;
+ // data de las revisiones est� auditada
+ assert ai_rev1.getData() != null;
+ assert si_rev1.getData() != null;
+ // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
+ assert ai_rev1.getNumerito() == NUMERITO;
+ assert si_rev1.getNumerito() == NUMERITO;
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(
+ NonAuditedImplementor.class, nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el
+ // resultado debe ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ nai_id, 1);
+ assert si_rev1 == null;
+ }
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,58 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-@Audited
-public class AuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String auditedImplementorData;
-
- private int numerito;
-
-
- protected AuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getAuditedImplementorData() {
- return auditedImplementorData;
- }
-
- public void setAuditedImplementorData(String implementorData) {
- this.auditedImplementorData = implementorData;
- }
-
- public int getNumerito() {
- return numerito;
- }
-
- public void setNumerito(int numerito) {
- this.numerito = numerito;
- }
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,58 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+ private int numerito;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,54 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class NonAuditedImplementor implements SimpleInterface {
-
- private long id;
-
- private String data;
-
- private String nonAuditedImplementorData;
-
- private int numerito;
-
-
- protected NonAuditedImplementor() {
-
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(long id) {
- this.id = id;
- }
-
- public String getData() {
- return data;
- }
-
- public void setData(String data) {
- this.data = data;
- }
-
- public String getNonAuditedImplementorData() {
- return nonAuditedImplementorData;
- }
-
- public void setNonAuditedImplementorData(String implementorData) {
- this.nonAuditedImplementorData = implementorData;
- }
-
- public int getNumerito() {
- return numerito;
- }
-
- public void setNumerito(int numerito) {
- this.numerito = numerito;
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,54 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+ private int numerito;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+}
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,26 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
-
-import org.hibernate.envers.Audited;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public interface SimpleInterface {
-
- long getId();
-
- void setId(long id);
-
- @Audited
- String getData();
-
- void setData(String data);
-
- @Audited
- int getNumerito();
-
- void setNumerito(int num);
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,26 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ @Audited
+ String getData();
+
+ void setData(String data);
+
+ @Audited
+ int getNumerito();
+
+ void setNumerito(int num);
+
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,31 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.joined;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class JoinedPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class JoinedPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,33 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.subclass;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class SubclassPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,33 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class SubclassPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union)
Deleted: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,31 +0,0 @@
-package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union;
-
-import java.io.File;
-import java.net.URISyntaxException;
-import java.net.URL;
-
-import org.hibernate.ejb.Ejb3Configuration;
-import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
-import org.testng.annotations.Test;
-
-/**
- * @author Hern�n Chanfreau
- *
- */
-
-public class UnionPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
-
- public void configure(Ejb3Configuration cfg) {
- try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml");
- cfg.addFile(new File(url.toURI()));
- } catch (URISyntaxException e) {
- e.printStackTrace();
- }
- }
-
- @Test
- public void testRetrieveAudited() {
- super.testRetrieveAudited();
- }
-}
Copied: core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java (from rev 18431, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class UnionPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings (from rev 18431, core/trunk/envers/src/test/resources/mappings)
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces)
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </subclass>
-
-
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+
+
+</hibernate-mapping>
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </subclass>
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </subclass>
+
+</hibernate-mapping>
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </subclass>
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+</hibernate-mapping>
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </union-subclass>
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Deleted: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
-</hibernate-mapping>
Copied: core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml (from rev 18431, core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml)
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/branches/envers-hibernate-3.3/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Modified: core/branches/envers-hibernate-3.3/src/test/resources/testng.xml
===================================================================
--- core/branches/envers-hibernate-3.3/src/test/resources/testng.xml 2010-01-07 14:43:39 UTC (rev 18431)
+++ core/branches/envers-hibernate-3.3/src/test/resources/testng.xml 2010-01-07 14:51:20 UTC (rev 18432)
@@ -31,6 +31,15 @@
<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.interfaces.hbm.allAudited.subclass" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.joined" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.union" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.subclass" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.joined" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.union" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.subclass" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.joined" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union" />
<package name="org.hibernate.envers.test.integration.manytomany" />
<package name="org.hibernate.envers.test.integration.manytomany.biowned" />
<package name="org.hibernate.envers.test.integration.manytomany.sametable" />
14 years, 11 months
Hibernate SVN: r18431 - in core/trunk/envers/src/test: java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass and 10 other directories.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2010-01-07 09:43:39 -0500 (Thu, 07 Jan 2010)
New Revision: 18431
Added:
core/trunk/envers/src/test/resources/mappings/
core/trunk/envers/src/test/resources/mappings/interfaces/
core/trunk/envers/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml
core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml
Removed:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml
Modified:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
Log:
HHH-4063:
- making the tests working also with maven
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -16,7 +16,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedAllAuditedMappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -16,7 +16,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassAllAuditedMappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </subclass>
-
-
-
-</hibernate-mapping>
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -16,7 +16,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionAllAuditedMappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
-</hibernate-mapping>
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -17,7 +17,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -17,7 +17,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </subclass>
-
-</hibernate-mapping>
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -17,7 +17,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- </union-subclass>
-
-</hibernate-mapping>
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -17,7 +17,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="INTERFACE" abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </joined-subclass>
-
- <joined-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <key column="ID"/>
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </joined-subclass>
-
-</hibernate-mapping>
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -17,7 +17,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
-
- <id name="id" column="ID" type="long">
- <generator class="native" />
- </id>
-
- <discriminator column="DISCRIMINATOR" />
-
- <property name="data" column="DATA" />
-
- </class>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- discriminator-value="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </subclass>
-
- <subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- discriminator-value="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </subclass>
-
-</hibernate-mapping>
Modified: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07 14:43:39 UTC (rev 18431)
@@ -17,7 +17,7 @@
public void configure(Ejb3Configuration cfg) {
try {
- URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml");
+ URL url = Thread.currentThread().getContextClassLoader().getResource("mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml");
cfg.addFile(new File(url.toURI()));
} catch (URISyntaxException e) {
e.printStackTrace();
Deleted: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:29:32 UTC (rev 18430)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="WINDOWS-1251"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
-
- <class
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- abstract="true" >
-
- <id name="id" column="ID" type="long">
- <generator class="increment" />
- </id>
-
- <property name="data" column="DATA" />
-
- </class>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="AUDITED_IMPLEMENTOR" >
-
- <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </union-subclass>
-
- <union-subclass
- name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
- extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
- table="NON_AUDITED_IMPLEMENTOR" >
-
- <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
-
- <property name="numerito" column="NUMERITO" />
-
- </union-subclass>
-
-</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/joinedAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/subclassAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+
+
+</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </subclass>
+
+</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/unionAllAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Copied: core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml (from rev 18429, core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml)
===================================================================
--- core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/resources/mappings/interfaces/unionPropertiesAuditedMappings.hbm.xml 2010-01-07 14:43:39 UTC (rev 18431)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+</hibernate-mapping>
14 years, 11 months
Hibernate SVN: r18429 - in core/trunk/envers/src: test/java/org/hibernate/envers/test/integration/interfaces and 16 other directories.
by hibernate-commits@lists.jboss.org
Author: adamw
Date: 2010-01-07 09:13:51 -0500 (Thu, 07 Jan 2010)
New Revision: 18429
Added:
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/MappedSubclassing2.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/SubclassEntity2.java
core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/SuperclassOfEntity2.java
Modified:
core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java
core/trunk/envers/src/test/resources/testng.xml
Log:
HHH-4063:
- applying patch from Hern?\195?\161n Chanfreau - thanks!
- fixing metadata reading for interfaces
- tests when entities are interfaces
Modified: core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java
===================================================================
--- core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java 2010-01-07 13:56:47 UTC (rev 18428)
+++ core/trunk/envers/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -81,7 +81,7 @@
private void addPropertiesFromClass(XClass clazz) {
XClass superclazz = clazz.getSuperclass();
- if (!"java.lang.Object".equals(superclazz.getName())) {
+ if (!clazz.isInterface() && !"java.lang.Object".equals(superclazz.getName())) {
addPropertiesFromClass(superclazz);
}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AbstractAllAuditedTest.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,122 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+import org.testng.Assert;
+
+import java.util.Arrays;
+
+/**
+ * @author Hern�n Chanfreau
+ * @author Adam Warski (adam at warski dot org)
+ */
+public abstract class AbstractAllAuditedTest extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+ em.getTransaction().begin();
+
+ ai = em.find(AuditedImplementor.class, ai.getId());
+ nai = em.find(NonAuditedImplementor.class, nai.getId());
+
+ ai.setData("La data 2");
+ ai.setAuditedImplementorData("audited implementor data 2");
+
+ nai.setData("info 2");
+ nai.setNonAuditedImplementorData("sttring 2");
+
+ em.getTransaction().commit();
+
+ //
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRevisions() {
+ Assert.assertEquals(getAuditReader().getRevisions(AuditedImplementor.class, ai_id), Arrays.asList(1, 2));
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class, ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(AuditedImplementor.class, ai_id, 1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, ai_id, 1);
+ assert si_rev1 != null;
+
+ AuditedImplementor ai_rev2 = getAuditReader().find(AuditedImplementor.class, ai_id, 2);
+ assert ai_rev2 != null;
+ SimpleInterface si_rev2 = getAuditReader().find(SimpleInterface.class, ai_id, 2);
+ assert si_rev2 != null;
+
+ // data de las actuales no debe ser null
+ Assert.assertEquals(ai.getData(), "La data 2");
+ Assert.assertEquals(si.getData(), "La data 2");
+ // la data de las revisiones no debe ser null
+ Assert.assertEquals(ai_rev1.getData(), "La data");
+ Assert.assertEquals(si_rev1.getData(), "La data");
+
+ Assert.assertEquals(ai_rev2.getData(), "La data 2");
+ Assert.assertEquals(si_rev2.getData(), "La data 2");
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(NonAuditedImplementor.class, nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class, nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el resultado debe ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class, nai_id, 1);
+ assert si_rev1 == null;
+
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/AuditedImplementor.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,47 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/NonAuditedImplementor.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,45 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/SimpleInterface.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,20 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+@Audited
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ String getData();
+
+ void setData(String data);
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/JoinedAllAuditedTest.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,43 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class JoinedAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/joined/joinedAllAuditedMappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/SubclassAllAuditedTest.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,44 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class SubclassAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/subclass/subclassAllAuditedMappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/UnionAllAuditedTest.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,43 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.allAudited.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AbstractAllAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+public class UnionAllAuditedTest extends AbstractAllAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ @Override
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+ @Test
+ @Override
+ public void testRetrieveNonAudited() {
+ super.testRetrieveNonAudited();
+ }
+
+ @Test
+ @Override
+ public void testRevisions() {
+ super.testRevisions();
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/allAudited/union/unionAllAuditedMappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AbstractPropertiesAuditedTest.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,109 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public abstract class AbstractPropertiesAuditedTest extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ private static int NUMERITO = 555;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+ ai.setNumerito(NUMERITO);
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+ nai.setNumerito(NUMERITO);
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+
+ // Revision 3
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(
+ AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(
+ AuditedImplementor.class, ai_id, 1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ ai_id, 1);
+ assert si_rev1 != null;
+
+ // data de las actuales no debe ser null
+ assert ai.getData() != null;
+ assert si.getData() != null;
+ // data de las revisiones No est� auditada
+ assert ai_rev1.getData() == null;
+ assert si_rev1.getData() == null;
+ // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
+ assert ai_rev1.getNumerito() == NUMERITO;
+ assert si_rev1.getNumerito() == NUMERITO;
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(
+ NonAuditedImplementor.class, nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el
+ // resultado debe ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ nai_id, 1);
+ assert si_rev1 == null;
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/AuditedImplementor.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,58 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+ private int numerito;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/NonAuditedImplementor.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,54 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+ private int numerito;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/SimpleInterface.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,25 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ String getData();
+
+ void setData(String data);
+
+ @Audited
+ int getNumerito();
+
+ void setNumerito(int num);
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/JoinedPropertiesAuditedTest.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class JoinedPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/joined/joinedPropertiesAuditedMappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/SubclassPropertiesAuditedTest.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,33 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class SubclassPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/subclass/subclassPropertiesAuditedMappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </subclass>
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/UnionPropertiesAuditedTest.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AbstractPropertiesAuditedTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class UnionPropertiesAuditedTest extends AbstractPropertiesAuditedTest {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited/union/unionPropertiesAuditedMappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AbstractPropertiesAudited2Test.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,109 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.envers.exception.NotAuditedException;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public abstract class AbstractPropertiesAudited2Test extends AbstractEntityTest {
+
+ private long ai_id;
+ private long nai_id;
+
+ private static int NUMERITO = 555;
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ EntityManager em = getEntityManager();
+
+ AuditedImplementor ai = new AuditedImplementor();
+ ai.setData("La data");
+ ai.setAuditedImplementorData("audited implementor data");
+ ai.setNumerito(NUMERITO);
+
+ NonAuditedImplementor nai = new NonAuditedImplementor();
+ nai.setData("info");
+ nai.setNonAuditedImplementorData("sttring");
+ nai.setNumerito(NUMERITO);
+
+ // Revision 1
+ em.getTransaction().begin();
+
+ em.persist(ai);
+
+ em.persist(nai);
+
+ em.getTransaction().commit();
+
+ // Revision 2
+
+ // Revision 3
+
+ ai_id = ai.getId();
+ nai_id = nai.getId();
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ // levanto las versiones actuales
+ AuditedImplementor ai = getEntityManager().find(
+ AuditedImplementor.class, ai_id);
+ assert ai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ ai_id);
+ assert si != null;
+
+ // levanto las de la revisi�n 1, ninguna debe ser null
+ AuditedImplementor ai_rev1 = getAuditReader().find(
+ AuditedImplementor.class, ai_id, 1);
+ assert ai_rev1 != null;
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ ai_id, 1);
+ assert si_rev1 != null;
+
+ // data de las actuales no debe ser null
+ assert ai.getData() != null;
+ assert si.getData() != null;
+ // data de las revisiones est� auditada
+ assert ai_rev1.getData() != null;
+ assert si_rev1.getData() != null;
+ // numerito de las revisiones est� auditada, debe ser igual a NUMERITO
+ assert ai_rev1.getNumerito() == NUMERITO;
+ assert si_rev1.getNumerito() == NUMERITO;
+ }
+
+ @Test
+ public void testRetrieveNonAudited() {
+ // levanto las versiones actuales
+ NonAuditedImplementor nai = getEntityManager().find(
+ NonAuditedImplementor.class, nai_id);
+ assert nai != null;
+ SimpleInterface si = getEntityManager().find(SimpleInterface.class,
+ nai_id);
+ assert si != null;
+
+ assert si.getData().equals(nai.getData());
+
+ try {
+ // levanto la revision
+ getAuditReader().find(NonAuditedImplementor.class, nai_id, 1);
+ assert false;
+ } catch (Exception e) {
+ // no es auditable!!!
+ assert (e instanceof NotAuditedException);
+ }
+
+ // levanto la revision que no es auditable pero con la interfaz, el
+ // resultado debe ser null
+ SimpleInterface si_rev1 = getAuditReader().find(SimpleInterface.class,
+ nai_id, 1);
+ assert si_rev1 == null;
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/AuditedImplementor.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,58 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+@Audited
+public class AuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String auditedImplementorData;
+
+ private int numerito;
+
+
+ protected AuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getAuditedImplementorData() {
+ return auditedImplementorData;
+ }
+
+ public void setAuditedImplementorData(String implementorData) {
+ this.auditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/NonAuditedImplementor.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,54 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class NonAuditedImplementor implements SimpleInterface {
+
+ private long id;
+
+ private String data;
+
+ private String nonAuditedImplementorData;
+
+ private int numerito;
+
+
+ protected NonAuditedImplementor() {
+
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getNonAuditedImplementorData() {
+ return nonAuditedImplementorData;
+ }
+
+ public void setNonAuditedImplementorData(String implementorData) {
+ this.nonAuditedImplementorData = implementorData;
+ }
+
+ public int getNumerito() {
+ return numerito;
+ }
+
+ public void setNumerito(int numerito) {
+ this.numerito = numerito;
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/SimpleInterface.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,26 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public interface SimpleInterface {
+
+ long getId();
+
+ void setId(long id);
+
+ @Audited
+ String getData();
+
+ void setData(String data);
+
+ @Audited
+ int getNumerito();
+
+ void setNumerito(int num);
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/JoinedPropertiesAudited2Test.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.joined;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class JoinedPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/joined/joinedPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="INTERFACE" abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </joined-subclass>
+
+ <joined-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <key column="ID"/>
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </joined-subclass>
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/SubclassPropertiesAudited2Test.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,33 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.subclass;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class SubclassPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/subclass/subclassPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="SIMPLES_interface" discriminator-value="SIMPLE_INTERFACE">
+
+ <id name="id" column="ID" type="long">
+ <generator class="native" />
+ </id>
+
+ <discriminator column="DISCRIMINATOR" />
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ discriminator-value="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </subclass>
+
+ <subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ discriminator-value="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </subclass>
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/UnionPropertiesAudited2Test.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,31 @@
+package org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AbstractPropertiesAudited2Test;
+import org.testng.annotations.Test;
+
+/**
+ * @author Hern�n Chanfreau
+ *
+ */
+
+public class UnionPropertiesAudited2Test extends AbstractPropertiesAudited2Test {
+
+ public void configure(Ejb3Configuration cfg) {
+ try {
+ URL url = Thread.currentThread().getContextClassLoader().getResource("org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml");
+ cfg.addFile(new File(url.toURI()));
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ }
+ }
+
+ @Test
+ public void testRetrieveAudited() {
+ super.testRetrieveAudited();
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/interfaces/hbm/propertiesAudited2/union/unionPropertiesAudited2Mappings.hbm.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="WINDOWS-1251"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+
+ <class
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ abstract="true" >
+
+ <id name="id" column="ID" type="long">
+ <generator class="increment" />
+ </id>
+
+ <property name="data" column="DATA" />
+
+ </class>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.AuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="AUDITED_IMPLEMENTOR" >
+
+ <property name="auditedImplementorData" column="IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </union-subclass>
+
+ <union-subclass
+ name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.NonAuditedImplementor"
+ extends="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.SimpleInterface"
+ table="NON_AUDITED_IMPLEMENTOR" >
+
+ <property name="nonAuditedImplementorData" column="NON_IMPLEMENTOR_DATA" />
+
+ <property name="numerito" column="NUMERITO" />
+
+ </union-subclass>
+
+</hibernate-mapping>
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/MappedSubclassing2.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/MappedSubclassing2.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/MappedSubclassing2.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,84 @@
+/*
+ * 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.superclass.auditedAtSuperclassLevel;
+
+import java.util.Arrays;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.ejb.Ejb3Configuration;
+import org.hibernate.envers.test.AbstractEntityTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ *
+ * @author Hern�n Chanfreau
+ *
+ * Same test from package
+ * org.hibernate.envers.test.integration.superclass changing the Audited
+ * annotation in MappedSuperclass from property str to class level
+ */
+public class MappedSubclassing2 extends AbstractEntityTest {
+ private Integer id1;
+
+ public void configure(Ejb3Configuration cfg) {
+ cfg.addAnnotatedClass(SubclassEntity2.class);
+ }
+
+ @BeforeClass(dependsOnMethods = "init")
+ public void initData() {
+ // Revision 1
+ EntityManager em = getEntityManager();
+ em.getTransaction().begin();
+ SubclassEntity2 se1 = new SubclassEntity2("x");
+ em.persist(se1);
+ id1 = se1.getId();
+ em.getTransaction().commit();
+
+ // Revision 2
+ em.getTransaction().begin();
+ se1 = em.find(SubclassEntity2.class, id1);
+ se1.setStr("y");
+ em.getTransaction().commit();
+ }
+
+ @Test
+ public void testRevisionsCounts() {
+ assert Arrays.asList(1, 2).equals(
+ getAuditReader().getRevisions(SubclassEntity2.class, id1));
+ }
+
+ @Test
+ public void testHistoryOfId1() {
+ SubclassEntity2 ver1 = new SubclassEntity2(id1, "x");
+ SubclassEntity2 ver2 = new SubclassEntity2(id1, "y");
+
+ assert getAuditReader().find(SubclassEntity2.class, id1, 1)
+ .equals(ver1);
+ assert getAuditReader().find(SubclassEntity2.class, id1, 2)
+ .equals(ver2);
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/SubclassEntity2.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/SubclassEntity2.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/SubclassEntity2.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -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.superclass.auditedAtSuperclassLevel;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ *
+ * @author Hern�n Chanfreau
+ *
+ * Same class from package
+ * org.hibernate.envers.test.integration.superclass changing the
+ * superclass to MappedSuperclass2
+ */
+@Entity
+public class SubclassEntity2 extends SuperclassOfEntity2 {
+ @Id
+ @GeneratedValue
+ private Integer id;
+
+ public SubclassEntity2() {
+ }
+
+ public SubclassEntity2(Integer id, String str) {
+ super(str);
+ this.id = id;
+ }
+
+ public SubclassEntity2(String str) {
+ super(str);
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (!(o instanceof SubclassEntity2))
+ return false;
+ if (!super.equals(o))
+ return false;
+
+ SubclassEntity2 that = (SubclassEntity2) o;
+
+ //noinspection RedundantIfStatement
+ if (id != null ? !id.equals(that.id) : that.id != null)
+ return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ int result = super.hashCode();
+ result = 31 * result + (id != null ? id.hashCode() : 0);
+ return result;
+ }
+}
Added: core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/SuperclassOfEntity2.java
===================================================================
--- core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/SuperclassOfEntity2.java (rev 0)
+++ core/trunk/envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditedAtSuperclassLevel/SuperclassOfEntity2.java 2010-01-07 14:13:51 UTC (rev 18429)
@@ -0,0 +1,78 @@
+/*
+ * 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.superclass.auditedAtSuperclassLevel;
+
+import javax.persistence.MappedSuperclass;
+
+import org.hibernate.envers.Audited;
+
+/**
+ * @author Adam Warski (adam at warski dot org)
+ *
+ * @author Hern�n Chanfreau
+ *
+ * Same class from package
+ * org.hibernate.envers.test.integration.superclass changing the Audited
+ * annotation from property str to class level
+ */
+@MappedSuperclass
+@Audited
+public class SuperclassOfEntity2 {
+
+ private String str;
+
+ public SuperclassOfEntity2() {
+ }
+
+ public SuperclassOfEntity2(String str) {
+ this.str = str;
+ }
+
+ public String getStr() {
+ return str;
+ }
+
+ public void setStr(String str) {
+ this.str = str;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (!(o instanceof SuperclassOfEntity2))
+ return false;
+
+ SuperclassOfEntity2 that = (SuperclassOfEntity2) o;
+
+ //noinspection RedundantIfStatement
+ if (str != null ? !str.equals(that.str) : that.str != null)
+ return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ return (str != null ? str.hashCode() : 0);
+ }
+}
Modified: core/trunk/envers/src/test/resources/testng.xml
===================================================================
--- core/trunk/envers/src/test/resources/testng.xml 2010-01-07 13:56:47 UTC (rev 18428)
+++ core/trunk/envers/src/test/resources/testng.xml 2010-01-07 14:13:51 UTC (rev 18429)
@@ -31,6 +31,15 @@
<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.interfaces.hbm.allAudited.subclass" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.joined" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.allAudited.union" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.subclass" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.joined" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited.union" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.subclass" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.joined" />
+ <package name="org.hibernate.envers.test.integration.interfaces.hbm.propertiesAudited2.union" />
<package name="org.hibernate.envers.test.integration.manytomany" />
<package name="org.hibernate.envers.test.integration.manytomany.biowned" />
<package name="org.hibernate.envers.test.integration.manytomany.sametable" />
14 years, 11 months
Hibernate SVN: r18428 - in core/trunk/annotations/src: test/java/org/hibernate/test/annotations/collectionelement and 1 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2010-01-07 08:56:47 -0500 (Thu, 07 Jan 2010)
New Revision: 18428
Modified:
core/trunk/annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java
Log:
HHH-4353 support JPA 2 default column naming for collections of basic types (and still honor the legacy approach)
Modified: core/trunk/annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java
===================================================================
--- core/trunk/annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java 2010-01-06 18:49:52 UTC (rev 18427)
+++ core/trunk/annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java 2010-01-07 13:56:47 UTC (rev 18428)
@@ -1552,7 +1552,9 @@
collectionBinder.setAccessType( inferredData.getDefaultAccess() );
Ejb3Column[] elementColumns;
- PropertyData virtualProperty = new WrappedInferredData( inferredData, "element" );
+ //do not use "element" if you are a JPA 2 @ElementCollection only for legacy Hibernate mappings
+ boolean isJPA2ForValueMapping = property.isAnnotationPresent( ElementCollection.class );
+ PropertyData virtualProperty = isJPA2ForValueMapping ? inferredData : new WrappedInferredData( inferredData, "element" );
if ( property.isAnnotationPresent( Column.class ) || property.isAnnotationPresent(
Formula.class
) ) {
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java 2010-01-06 18:49:52 UTC (rev 18427)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Boy.java 2010-01-07 13:56:47 UTC (rev 18428)
@@ -36,7 +36,10 @@
private String firstName;
private String lastName;
private Set<String> nickNames = new HashSet<String>();
+ private Set<String> hatedNames = new HashSet<String>();
+ private Set<String> preferredNames = new HashSet<String>();
private Map<String, Integer> scorePerNickName = new HashMap<String, Integer>();
+ private Map<String, Integer> scorePerPreferredName = new HashMap<String, Integer>();
private int[] favoriteNumbers;
private Set<Toy> favoriteToys = new HashSet<Toy>();
private Set<Character> characters = new HashSet<Character>();
@@ -78,6 +81,34 @@
this.nickNames = nickName;
}
+ @ElementCollection //default column names
+ public Set<String> getHatedNames() {
+ return hatedNames;
+ }
+
+ public void setHatedNames(Set<String> hatedNames) {
+ this.hatedNames = hatedNames;
+ }
+
+ @ElementCollection //default column names
+ @Column
+ public Set<String> getPreferredNames() {
+ return preferredNames;
+ }
+
+ public void setPreferredNames(Set<String> preferredNames) {
+ this.preferredNames = preferredNames;
+ }
+
+ @ElementCollection
+ public Map<String, Integer> getScorePerPreferredName() {
+ return scorePerPreferredName;
+ }
+
+ public void setScorePerPreferredName(Map<String, Integer> scorePerPreferredName) {
+ this.scorePerPreferredName = scorePerPreferredName;
+ }
+
@ElementCollection
@CollectionTable(name = "ScorePerNickName", joinColumns = @JoinColumn(name = "BoyId"))
@Column(name = "score", nullable = false)
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java 2010-01-06 18:49:52 UTC (rev 18427)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/CollectionElementTest.java 2010-01-07 13:56:47 UTC (rev 18428)
@@ -2,6 +2,7 @@
package org.hibernate.test.annotations.collectionelement;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Locale;
@@ -9,8 +10,11 @@
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.Transaction;
+import org.hibernate.mapping.Collection;
+import org.hibernate.mapping.Column;
import org.hibernate.test.annotations.Country;
import org.hibernate.test.annotations.TestCase;
+import org.hibernate.util.StringHelper;
/**
* @author Emmanuel Bernard
@@ -212,6 +216,32 @@
s.close();
}
+ public void testDefaultValueColumnForBasic() throws Exception {
+ isDefaultValueCollectionColumnPresent( Boy.class.getName(), "hatedNames" );
+ isDefaultValueCollectionColumnPresent( Boy.class.getName(), "preferredNames" );
+ isValueCollectionColumnPresent( Boy.class.getName(), "nickNames", "element" );
+ isDefaultValueCollectionColumnPresent( Boy.class.getName(), "scorePerPreferredName");
+ }
+
+ private void isLegacyValueCollectionColumnPresent(String collectionHolder, String propertyName) {
+
+ }
+
+ private void isDefaultValueCollectionColumnPresent(String collectionOwner, String propertyName) {
+ isValueCollectionColumnPresent( collectionOwner, propertyName, propertyName );
+ }
+
+ private void isValueCollectionColumnPresent(String collectionOwner, String propertyName, String columnName) {
+ final Collection collection = getCfg().getCollectionMapping( collectionOwner + "." + propertyName );
+ final Iterator columnIterator = collection.getCollectionTable().getColumnIterator();
+ boolean hasDefault = false;
+ while ( columnIterator.hasNext() ) {
+ Column column = (Column) columnIterator.next();
+ if ( columnName.equals( column.getName() ) ) hasDefault = true;
+ }
+ assertTrue( "Could not find " + columnName, hasDefault );
+ }
+
protected Class[] getMappings() {
return new Class[] {
Boy.class,
Modified: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java 2010-01-06 18:49:52 UTC (rev 18427)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/indexcoll/IndexedCollectionTest.java 2010-01-07 13:56:47 UTC (rev 18428)
@@ -33,13 +33,13 @@
isDefaultKeyColumnPresent( Drawer.class.getName(), "dresses", "_ORDER" );
}
- private void isDefaultKeyColumnPresent(String collectionRole, String propertyName, String suffix) {
+ private void isDefaultKeyColumnPresent(String collectionOwner, String propertyName, String suffix) {
assertTrue( "Could not find " + propertyName + suffix,
- isDefaultColumnPresent(collectionRole, propertyName, suffix) );
+ isDefaultColumnPresent(collectionOwner, propertyName, suffix) );
}
- private boolean isDefaultColumnPresent(String collectionRole, String propertyName, String suffix) {
- final Collection collection = getCfg().getCollectionMapping( collectionRole + "." + propertyName );
+ private boolean isDefaultColumnPresent(String collectionOwner, String propertyName, String suffix) {
+ final Collection collection = getCfg().getCollectionMapping( collectionOwner + "." + propertyName );
final Iterator columnIterator = collection.getCollectionTable().getColumnIterator();
boolean hasDefault = false;
while ( columnIterator.hasNext() ) {
@@ -49,9 +49,9 @@
return hasDefault;
}
- private void isNotDefaultKeyColumnPresent(String collectionRole, String propertyName, String suffix) {
+ private void isNotDefaultKeyColumnPresent(String collectionOwner, String propertyName, String suffix) {
assertFalse( "Could not find " + propertyName + suffix,
- isDefaultColumnPresent(collectionRole, propertyName, suffix) );
+ isDefaultColumnPresent(collectionOwner, propertyName, suffix) );
}
public void testFkList() throws Exception {
14 years, 11 months
Hibernate SVN: r18427 - in core/trunk: entitymanager/src/test/java/org/hibernate/ejb/test/ops and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: smarlow(a)redhat.com
Date: 2010-01-06 13:49:52 -0500 (Wed, 06 Jan 2010)
New Revision: 18427
Added:
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/OrderByTest.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Products.java
core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Widgets.java
Removed:
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/OrderByTest.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Products.java
core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Widgets.java
Log:
HHH-4688 Make sure @OrderBy works for @ElementCollection. move test case
Copied: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/OrderByTest.java (from rev 18424, core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/OrderByTest.java)
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/OrderByTest.java (rev 0)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/OrderByTest.java 2010-01-06 18:49:52 UTC (rev 18427)
@@ -0,0 +1,63 @@
+package org.hibernate.test.annotations.collectionelement;
+
+import junit.framework.Assert;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.hibernate.test.annotations.TestCase;
+
+import javax.persistence.EntityManager;
+import java.util.HashSet;
+import java.util.Iterator;
+
+public class OrderByTest extends TestCase {
+
+ /**
+ * Test @OrderBy on the Widgets.name field.
+ *
+ */
+ public void testOrderByName() throws Exception {
+ Session s = openSession();
+ Transaction tx = s.beginTransaction();
+
+ Products p = new Products();
+ HashSet<Widgets> set = new HashSet<Widgets>();
+
+ Widgets widget = new Widgets();
+ widget.setName("hammer");
+ set.add(widget);
+ s.persist(widget);
+
+ widget = new Widgets();
+ widget.setName("axel");
+ set.add(widget);
+ s.persist(widget);
+
+ widget = new Widgets();
+ widget.setName("screwdriver");
+ set.add(widget);
+ s.persist(widget);
+
+ p.setWidgets(set);
+ s.persist(p);
+ tx.commit();
+
+ tx = s.beginTransaction();
+ s.clear();
+ p = (Products) s.get(Products.class,p.getId());
+ Assert.assertTrue("has three Widgets", p.getWidgets().size() == 3);
+ Iterator iter = p.getWidgets().iterator();
+ Assert.assertEquals( "axel", ((Widgets)iter.next()).getName() );
+ Assert.assertEquals( "hammer", ((Widgets)iter.next()).getName() );
+ Assert.assertEquals( "screwdriver", ((Widgets)iter.next()).getName() );
+ tx.commit();
+ s.close();
+ }
+
+ protected Class[] getMappings() {
+ return new Class[] {
+ Products.class,
+ Widgets.class
+ };
+ }
+
+}
Copied: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Products.java (from rev 18424, core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Products.java)
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Products.java (rev 0)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Products.java 2010-01-06 18:49:52 UTC (rev 18427)
@@ -0,0 +1,39 @@
+package org.hibernate.test.annotations.collectionelement;
+
+import javax.persistence.ElementCollection;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OrderBy;
+
+import java.util.Set;
+
+@SuppressWarnings({"unchecked", "serial"})
+
+@Entity
+public class Products {
+ @Id
+ @GeneratedValue
+ private Integer id;
+
+ @ElementCollection
+ @OrderBy("name ASC")
+ private Set<Widgets> widgets;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Set<Widgets> getWidgets() {
+ return widgets;
+ }
+
+ public void setWidgets(Set<Widgets> widgets) {
+ this.widgets = widgets;
+ }
+
+}
\ No newline at end of file
Copied: core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Widgets.java (from rev 18424, core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Widgets.java)
===================================================================
--- core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Widgets.java (rev 0)
+++ core/trunk/annotations/src/test/java/org/hibernate/test/annotations/collectionelement/Widgets.java 2010-01-06 18:49:52 UTC (rev 18427)
@@ -0,0 +1,34 @@
+package org.hibernate.test.annotations.collectionelement;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class Widgets {
+ private String name;
+ private int id;
+
+ public Widgets() {
+
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Id
+ @GeneratedValue
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+}
Deleted: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/OrderByTest.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/OrderByTest.java 2010-01-06 18:42:55 UTC (rev 18426)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/OrderByTest.java 2010-01-06 18:49:52 UTC (rev 18427)
@@ -1,61 +0,0 @@
-package org.hibernate.ejb.test.ops;
-
-import org.hibernate.ejb.test.TestCase;
-
-import javax.persistence.EntityManager;
-import java.util.HashSet;
-import java.util.Iterator;
-
-public class OrderByTest extends TestCase {
-
- public Class[] getAnnotatedClasses() {
- return new Class[]{
- Products.class,
- Widgets.class
- };
- }
-
- /**
- * Test @OrderBy on the Widgets.name field.
- *
- */
- public void testOrderByName() throws Exception {
- EntityManager em = getOrCreateEntityManager();
- em.getTransaction().begin();
-
- Products p = new Products();
- HashSet<Widgets> set = new HashSet<Widgets>();
-
- Widgets widget = new Widgets();
- widget.setName("hammer");
- set.add(widget);
- em.persist(widget);
-
- widget = new Widgets();
- widget.setName("axel");
- set.add(widget);
- em.persist(widget);
-
- widget = new Widgets();
- widget.setName("screwdriver");
- set.add(widget);
- em.persist(widget);
-
- p.setWidgets(set);
- em.persist(p);
- em.getTransaction().commit();
-
- em.getTransaction().begin();
- em.clear();
- p = em.find(Products.class,p.getId());
- assertTrue("has three Widgets", p.getWidgets().size() == 3);
- Iterator iter = p.getWidgets().iterator();
- assertEquals( "axel", ((Widgets)iter.next()).getName() );
- assertEquals( "hammer", ((Widgets)iter.next()).getName() );
- assertEquals( "screwdriver", ((Widgets)iter.next()).getName() );
- em.getTransaction().commit();
- em.close();
- }
-
-
-}
Deleted: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Products.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Products.java 2010-01-06 18:42:55 UTC (rev 18426)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Products.java 2010-01-06 18:49:52 UTC (rev 18427)
@@ -1,39 +0,0 @@
-package org.hibernate.ejb.test.ops;
-
-import javax.persistence.ElementCollection;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.OrderBy;
-
-import java.util.Set;
-
-@SuppressWarnings({"unchecked", "serial"})
-
-@Entity
-public class Products {
- @Id
- @GeneratedValue
- private Integer id;
-
- @ElementCollection
- @OrderBy("name ASC")
- private Set<Widgets> widgets;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Set<Widgets> getWidgets() {
- return widgets;
- }
-
- public void setWidgets(Set<Widgets> widgets) {
- this.widgets = widgets;
- }
-
-}
\ No newline at end of file
Deleted: core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Widgets.java
===================================================================
--- core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Widgets.java 2010-01-06 18:42:55 UTC (rev 18426)
+++ core/trunk/entitymanager/src/test/java/org/hibernate/ejb/test/ops/Widgets.java 2010-01-06 18:49:52 UTC (rev 18427)
@@ -1,34 +0,0 @@
-package org.hibernate.ejb.test.ops;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-@Entity
-public class Widgets {
- private String name;
- private int id;
-
- public Widgets() {
-
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- @Id
- @GeneratedValue
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
-}
14 years, 11 months
Hibernate SVN: r18426 - annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/indexcoll.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-06 13:42:55 -0500 (Wed, 06 Jan 2010)
New Revision: 18426
Modified:
annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/indexcoll/AddressBook.java
Log:
JBPAPP-2082 ANN-841 - Bidirectional indexed collection mapped incorrectly for IndexedCollectionTest
Modified: annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/indexcoll/AddressBook.java
===================================================================
--- annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/indexcoll/AddressBook.java 2010-01-06 18:42:18 UTC (rev 18425)
+++ annotations/branches/v3_3_1_GA_CP/src/test/org/hibernate/test/annotations/indexcoll/AddressBook.java 2010-01-06 18:42:55 UTC (rev 18426)
@@ -42,7 +42,6 @@
@MapKey
@OneToMany(mappedBy = "book", cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE})
- @JoinTable(name="AddRegEntry")
public Map<AddressEntryPk, AddressEntry> getEntries() {
return entries;
}
@@ -63,7 +62,6 @@
@MapKey(name = "directory")
@OneToMany(mappedBy = "book")
- @JoinTable(name="Dir_Entry")
public Map<AlphabeticalDirectory, AddressEntry> getDirectoryEntries() {
return directoryEntries;
}
14 years, 11 months
Hibernate SVN: r18425 - annotations/branches/v3_3_1_GA_CP/src/java/org/hibernate/cfg/annotations.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-06 13:42:18 -0500 (Wed, 06 Jan 2010)
New Revision: 18425
Modified:
annotations/branches/v3_3_1_GA_CP/src/java/org/hibernate/cfg/annotations/CollectionBinder.java
Log:
JBPAPP-2082 ANN-841 - Bidirectional indexed collection mapped incorrectly for IndexedCollectionTest
Modified: annotations/branches/v3_3_1_GA_CP/src/java/org/hibernate/cfg/annotations/CollectionBinder.java
===================================================================
--- annotations/branches/v3_3_1_GA_CP/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-01-06 18:08:29 UTC (rev 18424)
+++ annotations/branches/v3_3_1_GA_CP/src/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-01-06 18:42:18 UTC (rev 18425)
@@ -11,6 +11,7 @@
import javax.persistence.AttributeOverrides;
import javax.persistence.Embeddable;
import javax.persistence.FetchType;
+import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.MapKey;
@@ -405,13 +406,20 @@
//work on association
boolean isMappedBy = !BinderHelper.isDefault( mappedBy );
+ if (isMappedBy
+ && (property.isAnnotationPresent( JoinColumn.class )
+ || property.isAnnotationPresent( JoinTable.class ) ) ) {
+ String message = "Associations marked as mappedBy must not define database mappings like @JoinTable or @JoinColumn: ";
+ message += StringHelper.qualify( propertyHolder.getPath(), propertyName );
+ throw new AnnotationException( message );
+ }
collection.setInverse( isMappedBy );
//many to many may need some second pass informations
if ( !oneToMany && isMappedBy ) {
mappings.addMappedBy( getCollectionType().getName(), mappedBy, propertyName );
}
- //TODO reducce tableBinder != null and oneToMany
+ //TODO reduce tableBinder != null and oneToMany
XClass collectionType = getCollectionType();
SecondPass sp = getSecondPass(
fkJoinColumns,
@@ -425,7 +433,7 @@
);
if ( collectionType.isAnnotationPresent( Embeddable.class )
|| property.isAnnotationPresent( CollectionOfElements.class ) ) {
- // do it right away, otherwise @ManyToon on composite element call addSecondPass
+ // do it right away, otherwise @ManyToOne on composite element call addSecondPass
// and raise a ConcurrentModificationException
//sp.doSecondPass( CollectionHelper.EMPTY_MAP );
mappings.addSecondPass( sp, !isMappedBy );
14 years, 11 months
Hibernate SVN: r18424 - in annotations/branches/v3_4_0_GA_CP/src: test/java/org/hibernate/test/annotations/indexcoll and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-01-06 13:08:29 -0500 (Wed, 06 Jan 2010)
New Revision: 18424
Modified:
annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java
annotations/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/test/annotations/indexcoll/AddressBook.java
Log:
JBPAPP-2082 ANN-841 - Bidirectional indexed collection mapped incorrectly for IndexedCollectionTest
Modified: annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java
===================================================================
--- annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-01-06 17:52:44 UTC (rev 18423)
+++ annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java 2010-01-06 18:08:29 UTC (rev 18424)
@@ -11,6 +11,7 @@
import javax.persistence.AttributeOverrides;
import javax.persistence.Embeddable;
import javax.persistence.FetchType;
+import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.MapKey;
@@ -407,6 +408,15 @@
//work on association
boolean isMappedBy = !BinderHelper.isDefault( mappedBy );
+
+ if (isMappedBy
+ && (property.isAnnotationPresent( JoinColumn.class )
+ || property.isAnnotationPresent( JoinTable.class ) ) ) {
+ String message = "Associations marked as mappedBy must not define database mappings like @JoinTable or @JoinColumn: ";
+ message += StringHelper.qualify( propertyHolder.getPath(), propertyName );
+ throw new AnnotationException( message );
+ }
+
collection.setInverse( isMappedBy );
//many to many may need some second pass informations
@@ -427,7 +437,7 @@
);
if ( collectionType.isAnnotationPresent( Embeddable.class )
|| property.isAnnotationPresent( CollectionOfElements.class ) ) {
- // do it right away, otherwise @ManyToon on composite element call addSecondPass
+ // do it right away, otherwise @ManyToOne on composite element call addSecondPass
// and raise a ConcurrentModificationException
//sp.doSecondPass( CollectionHelper.EMPTY_MAP );
mappings.addSecondPass( sp, !isMappedBy );
Modified: annotations/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/test/annotations/indexcoll/AddressBook.java
===================================================================
--- annotations/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/test/annotations/indexcoll/AddressBook.java 2010-01-06 17:52:44 UTC (rev 18423)
+++ annotations/branches/v3_4_0_GA_CP/src/test/java/org/hibernate/test/annotations/indexcoll/AddressBook.java 2010-01-06 18:08:29 UTC (rev 18424)
@@ -42,7 +42,6 @@
@MapKey
@OneToMany(mappedBy = "book", cascade = {CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REMOVE})
- @JoinTable(name="AddRegEntry")
public Map<AddressEntryPk, AddressEntry> getEntries() {
return entries;
}
@@ -63,7 +62,6 @@
@MapKey(name = "directory")
@OneToMany(mappedBy = "book")
- @JoinTable(name="Dir_Entry")
public Map<AlphabeticalDirectory, AddressEntry> getDirectoryEntries() {
return directoryEntries;
}
14 years, 11 months