HHH-7702 PluralAttributeElementBinding.Nature.AGGREGATION -> COMPONENT
This commit is contained in:
parent
9ed8ac16aa
commit
b55e173ec4
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue