diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/metamodel/internal/builder/AttributeBuilder.java b/hibernate-core/src/main/java/org/hibernate/jpa/metamodel/internal/builder/AttributeBuilder.java index c7d3ef5838..7db21509b8 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/metamodel/internal/builder/AttributeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/metamodel/internal/builder/AttributeBuilder.java @@ -340,7 +340,7 @@ public class AttributeBuilder { elementPersistentAttributeType = PersistentAttributeType.BASIC; persistentAttributeType = PersistentAttributeType.ELEMENT_COLLECTION; } - else if ( elementNature == PluralAttributeElementBinding.Nature.AGGREGATION ) { + else if ( elementNature == PluralAttributeElementBinding.Nature.COMPONENT ) { elementPersistentAttributeType = PersistentAttributeType.EMBEDDED; persistentAttributeType = PersistentAttributeType.ELEMENT_COLLECTION; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/Binder.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/Binder.java index 1d5647fb10..2db464289d 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/Binder.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/Binder.java @@ -2315,7 +2315,7 @@ public class Binder { pluralAttributeBinding.getAttribute().getName(), getReferencedPropertyNameIfNotId( pluralAttributeBinding ), pluralAttributeBinding.getPluralAttributeElementBinding() - .getNature() == PluralAttributeElementBinding.Nature.AGGREGATION + .getNature() == PluralAttributeElementBinding.Nature.COMPONENT ); } @@ -2326,7 +2326,7 @@ public class Binder { final TypeFactory typeFactory = metadata.getTypeResolver().getTypeFactory(); final String role = pluralAttributeBinding.getAttribute().getRole(); final String propertyRef = getReferencedPropertyNameIfNotId( pluralAttributeBinding ); - final boolean embedded = pluralAttributeBinding.getPluralAttributeElementBinding().getNature() == PluralAttributeElementBinding.Nature.AGGREGATION; + final boolean embedded = pluralAttributeBinding.getPluralAttributeElementBinding().getNature() == PluralAttributeElementBinding.Nature.COMPONENT; switch ( nature ){ case BAG: return typeFactory.bag( role, propertyRef, embedded ); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/AbstractPluralAttributeBinding.java b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/AbstractPluralAttributeBinding.java index 03c898738e..f644740836 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/AbstractPluralAttributeBinding.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/AbstractPluralAttributeBinding.java @@ -98,7 +98,7 @@ public abstract class AbstractPluralAttributeBinding extends AbstractAttributeBi case BASIC: { return new BasicPluralAttributeElementBinding( this ); } - case AGGREGATION: { + case COMPONENT: { return new CompositePluralAttributeElementBinding( this ); } case ONE_TO_MANY: { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/CompositePluralAttributeElementBinding.java b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/CompositePluralAttributeElementBinding.java index 9f1abee9a8..ef0554461e 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/CompositePluralAttributeElementBinding.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/CompositePluralAttributeElementBinding.java @@ -26,7 +26,7 @@ package org.hibernate.metamodel.spi.binding; import java.util.List; /** - * Describes plural attributes of {@link org.hibernate.metamodel.spi.binding.PluralAttributeElementBinding.Nature#AGGREGATION} elements + * Describes plural attributes of {@link org.hibernate.metamodel.spi.binding.PluralAttributeElementBinding.Nature#COMPONENT} elements * * @author Steve Ebersole * @author Gail Badner @@ -38,7 +38,7 @@ public class CompositePluralAttributeElementBinding extends AbstractPluralAttrib @Override public Nature getNature() { - return Nature.AGGREGATION; + return Nature.COMPONENT; } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/PluralAttributeElementBinding.java b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/PluralAttributeElementBinding.java index dc69f5eabb..7562da757a 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/PluralAttributeElementBinding.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/PluralAttributeElementBinding.java @@ -74,7 +74,7 @@ public interface PluralAttributeElementBinding { /** * The collection elements are compositions. */ - AGGREGATION( false ), + COMPONENT( false ), /** * The collection elements represent entity's in a one-to-many association. */