[hibernate/hibernate-core] fcbca0: HHH-6173 making ConfiguredClass a base class for E...
by noreply@github.com
Branch: refs/heads/master
Home: https://github.com/hibernate/hibernate-core
Commit: fcbca08a1f173f6643d6a90c6e93a49f7f6a36ab
https://github.com/hibernate/hibernate-core/commit/fcbca08a1f173f6643d6a9...
Author: Hardy Ferentschik <hardy(a)hibernate.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/AnnotationBinder.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/AnnotationBindingContext.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassHierarchy.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EmbeddedClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/EntityBindingStateImpl.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilder.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/EmbeddableBindingTests.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/TableNameTest.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilderTest.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/GenericTypeDiscoveryTest.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/TypeDiscoveryTest.java
Log Message:
-----------
HHH-6173 making ConfiguredClass a base class for EnityClass and EmbeddedClass
Commit: 08ed4c1e80163581fa7c4d046ad502ffdd97402d
https://github.com/hibernate/hibernate-core/commit/08ed4c1e80163581fa7c4d...
Author: Hardy Ferentschik <hardy(a)hibernate.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EmbeddedClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/EntityBindingStateImpl.java
Log Message:
-----------
HHH-6173 Passing association and attribute overrides to EmbeddedClass
Commit: 157d50b434c3451a7c53ccabfeedd3028f944e34
https://github.com/hibernate/hibernate-core/commit/157d50b434c3451a7c53cc...
Author: Hardy Ferentschik <hardy(a)hibernate.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/AttributeType.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityClass.java
Log Message:
-----------
HHH-6173 Fixing some bugs and adding some improvements pointed out by Strong
Commit: d86ce7e68ae2ffc27bd7ea769dfb080eb10bef35
https://github.com/hibernate/hibernate-core/commit/d86ce7e68ae2ffc27bd7ea...
Author: Hardy Ferentschik <hardy(a)hibernate.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/engine/spi/CascadeStyle.java
M hibernate-core/src/main/java/org/hibernate/metamodel/binding/EntityBinding.java
M hibernate-core/src/main/java/org/hibernate/metamodel/domain/AttributeContainer.java
Log Message:
-----------
HHH-6173 formatting
Commit: 295e67201c5583c36ef633503302b3d662f4278b
https://github.com/hibernate/hibernate-core/commit/295e67201c5583c36ef633...
Author: Hardy Ferentschik <hardy(a)hibernate.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/metamodel/domain/AbstractAttributeContainer.java
M hibernate-core/src/main/java/org/hibernate/metamodel/domain/AttributeContainer.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/EmbeddableBindingTests.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/GenericTypeDiscoveryTest.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/TypeDiscoveryTest.java
Log Message:
-----------
HHH-6173 Creating domain component for embeddables
Commit: 96b4d410c478a5ab719b55949ed40910aac92db5
https://github.com/hibernate/hibernate-core/commit/96b4d410c478a5ab719b55...
Author: Hardy Ferentschik <hardy(a)hibernate.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/metamodel/binding/EntityBinding.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/hbm/AbstractEntityBinder.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/hbm/RootEntityBinder.java
M hibernate-core/src/test/java/org/hibernate/metamodel/binding/SimpleValueBindingTests.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/EmbeddableBindingTests.java
Log Message:
-----------
HHH-6173 the makeXYX methods in EntityBinding now take the actual attribute instead of just the attribute name
Commit: 1ec38d23abc3e6b26e70628e480b0b3ea7cec4ac
https://github.com/hibernate/hibernate-core/commit/1ec38d23abc3e6b26e7062...
Author: Hardy Ferentschik <hardy(a)hibernate.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/AnnotationBindingContext.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/AssociationAttribute.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/AttributeType.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/ColumnValues.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/DiscriminatorColumnValues.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/MappedAttribute.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/SimpleAttribute.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/package-info.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/state/binding/AttributeBindingStateImpl.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/state/binding/DiscriminatorBindingStateImpl.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/state/binding/ManyToOneBindingStateImpl.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/state/relational/ColumnRelationalStateImpl.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/state/relational/ManyToOneRelationalStateImpl.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/attribute/state/relational/TupleRelationalStateImpl.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/AnnotationBindingContext.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/AssociationAttribute.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/AttributeType.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ColumnValues.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassHierarchy.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/DiscriminatorColumnValues.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EmbeddedClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityClass.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/MappedAttribute.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/SimpleAttribute.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/AttributeBindingStateImpl.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/DiscriminatorBindingStateImpl.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/binding/ManyToOneBindingStateImpl.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/ColumnRelationalStateImpl.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/ManyToOneRelationalStateImpl.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/state/relational/TupleRelationalStateImpl.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilder.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/util/ReflectionHelper.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/GenericTypeDiscoveryTest.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/TypeDiscoveryTest.java
M hibernate-core/src/test/java/org/hibernate/test/annotations/generics/Gene.java
Log Message:
-----------
HHH-6173 Introduced org.hibernate.metamodel.source.annotations.attribute package and moving attribute related classes from org.hibernate.metamodel.source.annotations.entity into it.
Also refactored generic type resolution via class mate
Commit: ff312720ce016bbc790dea86539dbb97f09fedc0
https://github.com/hibernate/hibernate-core/commit/ff312720ce016bbc790dea...
Author: Hardy Ferentschik <hardy(a)hibernate.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/AnnotationBinder.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/AnnotationBindingContext.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/ConfiguredClassHierarchy.java
A hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EmbeddableClass.java
R hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EmbeddedClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityClass.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/package-info.java
M hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilder.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/TableNameTest.java
A hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/BaseAnnotationIndexTestCase.java
R hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/ConfiguredClassHierarchyBuilderTest.java
A hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/EmbeddableHierarchyTest.java
A hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/EntityHierarchyTest.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/GenericTypeDiscoveryTest.java
M hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/util/TypeDiscoveryTest.java
Log Message:
-----------
HHH-6173 allow embeddable classes to use inheritance as well
Compare: https://github.com/hibernate/hibernate-core/compare/33a4694...ff31272
13 years, 6 months
[hibernate/hibernate-core] 9129cf: Merge pull request #112 from lukasz-antoniak/HHH-5...
by noreply@github.com
Branch: refs/heads/master
Home: https://github.com/hibernate/hibernate-core
Commit: 9129cf38ce39c108ebf6fff9f33d21fb0e53c3cc
https://github.com/hibernate/hibernate-core/commit/9129cf38ce39c108ebf6ff...
Author: Adam Warski <adam(a)warski.org>
Date: 2011-06-29 (Wed, 29 Jun 2011)
Changed paths:
M documentation/src/main/docbook/devguide/en-US/Envers.xml
M hibernate-envers/src/main/java/org/hibernate/envers/Audited.java
M hibernate-envers/src/main/java/org/hibernate/envers/configuration/metadata/reader/AuditedPropertiesReader.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/BabyCompleteEntity.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/ChildCompleteEntity.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/ChildMultipleParentsEntity.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/ChildSingleParentEntity.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/ExplicitTransitiveChildEntity.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/ImplicitTransitiveChildEntity.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/MappedGrandparentEntity.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/MappedParentEntity.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/MultipleAuditParentsTest.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/SingleAuditParentsTest.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/TotalAuditParentsTest.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/TransitiveAuditParentsTest.java
A hibernate-envers/src/test/java/org/hibernate/envers/test/integration/superclass/auditparents/TransitiveParentEntity.java
Log Message:
-----------
Merge pull request #112 from lukasz-antoniak/HHH-5917
HHH-5917 - Adding @Audited(auditedParents={classes})
13 years, 6 months
Hibernate SVN: r20972 - annotations/tags/3_2_1_GA_CP03_JBPAPP-6785/src/java/org/hibernate/cfg.
by hibernate-commits@lists.jboss.org
Author: smendenh(a)redhat.com
Date: 2011-06-28 15:34:11 -0400 (Tue, 28 Jun 2011)
New Revision: 20972
Modified:
annotations/tags/3_2_1_GA_CP03_JBPAPP-6785/src/java/org/hibernate/cfg/FkSecondPass.java
Log:
patched for one-off JBPAPP-6785 from changes in http://source.jboss.org/changelog/Hibernate?cs=14383
Modified: annotations/tags/3_2_1_GA_CP03_JBPAPP-6785/src/java/org/hibernate/cfg/FkSecondPass.java
===================================================================
--- annotations/tags/3_2_1_GA_CP03_JBPAPP-6785/src/java/org/hibernate/cfg/FkSecondPass.java 2011-06-28 19:18:18 UTC (rev 20971)
+++ annotations/tags/3_2_1_GA_CP03_JBPAPP-6785/src/java/org/hibernate/cfg/FkSecondPass.java 2011-06-28 19:34:11 UTC (rev 20972)
@@ -1,6 +1,8 @@
// $Id$
package org.hibernate.cfg;
+import java.util.concurrent.atomic.AtomicInteger;
+
import org.hibernate.AnnotationException;
import org.hibernate.AssertionFailure;
import org.hibernate.MappingException;
@@ -16,12 +18,22 @@
* Enable a proper set of the FK columns in respect with the id column order
* Allow the correct implementation of the default EJB3 values which needs both
* sides of the association to be resolved
+ *
+ * One-off patch for ANN_683 manually applied from http://source.jboss.org/changelog/Hibernate?cs=14383
*
* @author Emmanuel Bernard
*/
public class FkSecondPass implements SecondPass {
private ToOne value;
private Ejb3JoinColumn[] columns;
+ /**
+ * unique counter is needed to differenciate 2 instances of FKSecondPass
+ * as they are compared.
+ * Fairly hacky but IBM VM sometimes returns the same hashCode for 2 different objects
+ * TODO is it doable to rely on the Ejb3JoinColumn names? Not sure at they could be inferred
+ */
+ private int uniqueCounter;
+ private static AtomicInteger globalCounter = new AtomicInteger();
private boolean unique;
private ExtendedMappings mappings;
private String path;
@@ -33,14 +45,35 @@
this.mappings = mappings;
this.value = value;
this.columns = columns;
+ this.uniqueCounter = globalCounter.getAndIncrement();
this.unique = unique;
this.entityClassName = entityClassName;
this.path = entityClassName != null ? path.substring( entityClassName.length() + 1 ) : path;
}
+
+ public int getUniqueCounter() {
+ return uniqueCounter;
+ }
public ToOne getValue() {
return value;
}
+
+ public boolean equals(Object o) {
+ if ( this == o ) return true;
+ if ( !( o instanceof FkSecondPass ) ) return false;
+
+ FkSecondPass that = (FkSecondPass) o;
+
+ if ( uniqueCounter != that.uniqueCounter ) return false;
+
+ return true;
+ }
+
+ public int hashCode() {
+ return uniqueCounter;
+ }
+
public boolean isInPrimaryKey() {
if (entityClassName == null) return false;
13 years, 6 months