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;
|
elementPersistentAttributeType = PersistentAttributeType.BASIC;
|
||||||
persistentAttributeType = PersistentAttributeType.ELEMENT_COLLECTION;
|
persistentAttributeType = PersistentAttributeType.ELEMENT_COLLECTION;
|
||||||
}
|
}
|
||||||
else if ( elementNature == PluralAttributeElementBinding.Nature.AGGREGATION ) {
|
else if ( elementNature == PluralAttributeElementBinding.Nature.COMPONENT ) {
|
||||||
elementPersistentAttributeType = PersistentAttributeType.EMBEDDED;
|
elementPersistentAttributeType = PersistentAttributeType.EMBEDDED;
|
||||||
persistentAttributeType = PersistentAttributeType.ELEMENT_COLLECTION;
|
persistentAttributeType = PersistentAttributeType.ELEMENT_COLLECTION;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2315,7 +2315,7 @@ public class Binder {
|
||||||
pluralAttributeBinding.getAttribute().getName(),
|
pluralAttributeBinding.getAttribute().getName(),
|
||||||
getReferencedPropertyNameIfNotId( pluralAttributeBinding ),
|
getReferencedPropertyNameIfNotId( pluralAttributeBinding ),
|
||||||
pluralAttributeBinding.getPluralAttributeElementBinding()
|
pluralAttributeBinding.getPluralAttributeElementBinding()
|
||||||
.getNature() == PluralAttributeElementBinding.Nature.AGGREGATION
|
.getNature() == PluralAttributeElementBinding.Nature.COMPONENT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2326,7 +2326,7 @@ public class Binder {
|
||||||
final TypeFactory typeFactory = metadata.getTypeResolver().getTypeFactory();
|
final TypeFactory typeFactory = metadata.getTypeResolver().getTypeFactory();
|
||||||
final String role = pluralAttributeBinding.getAttribute().getRole();
|
final String role = pluralAttributeBinding.getAttribute().getRole();
|
||||||
final String propertyRef = getReferencedPropertyNameIfNotId( pluralAttributeBinding );
|
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 ){
|
switch ( nature ){
|
||||||
case BAG:
|
case BAG:
|
||||||
return typeFactory.bag( role, propertyRef, embedded );
|
return typeFactory.bag( role, propertyRef, embedded );
|
||||||
|
|
|
@ -98,7 +98,7 @@ public abstract class AbstractPluralAttributeBinding extends AbstractAttributeBi
|
||||||
case BASIC: {
|
case BASIC: {
|
||||||
return new BasicPluralAttributeElementBinding( this );
|
return new BasicPluralAttributeElementBinding( this );
|
||||||
}
|
}
|
||||||
case AGGREGATION: {
|
case COMPONENT: {
|
||||||
return new CompositePluralAttributeElementBinding( this );
|
return new CompositePluralAttributeElementBinding( this );
|
||||||
}
|
}
|
||||||
case ONE_TO_MANY: {
|
case ONE_TO_MANY: {
|
||||||
|
|
|
@ -26,7 +26,7 @@ package org.hibernate.metamodel.spi.binding;
|
||||||
import java.util.List;
|
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 Steve Ebersole
|
||||||
* @author Gail Badner
|
* @author Gail Badner
|
||||||
|
@ -38,7 +38,7 @@ public class CompositePluralAttributeElementBinding extends AbstractPluralAttrib
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Nature getNature() {
|
public Nature getNature() {
|
||||||
return Nature.AGGREGATION;
|
return Nature.COMPONENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -74,7 +74,7 @@ public interface PluralAttributeElementBinding {
|
||||||
/**
|
/**
|
||||||
* The collection elements are compositions.
|
* The collection elements are compositions.
|
||||||
*/
|
*/
|
||||||
AGGREGATION( false ),
|
COMPONENT( false ),
|
||||||
/**
|
/**
|
||||||
* The collection elements represent entity's in a one-to-many association.
|
* The collection elements represent entity's in a one-to-many association.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue