HHH-7049 - Add tests of org.hibernate.metamodel.internal.source stuff

This commit is contained in:
Steve Ebersole 2012-02-12 18:39:07 -06:00
parent 01eec1fbd2
commit 6803e63460
1 changed files with 9 additions and 7 deletions

View File

@ -120,6 +120,7 @@ public class RootEntitySourceImpl extends AbstractEntitySourceImpl implements Ro
public List<AttributeSource> attributeSources() { public List<AttributeSource> attributeSources() {
List<AttributeSource> attributeSources = new ArrayList<AttributeSource>(); List<AttributeSource> attributeSources = new ArrayList<AttributeSource>();
final JaxbHibernateMapping.JaxbClass.JaxbNaturalId naturalId = entityElement().getNaturalId(); final JaxbHibernateMapping.JaxbClass.JaxbNaturalId naturalId = entityElement().getNaturalId();
if ( naturalId != null ) {
processAttributes( processAttributes(
attributeSources, attributeSources,
naturalId.getPropertyOrManyToOneOrComponent(), naturalId.getPropertyOrManyToOneOrComponent(),
@ -127,6 +128,7 @@ public class RootEntitySourceImpl extends AbstractEntitySourceImpl implements Ro
? SingularAttributeSource.NaturalIdMutability.MUTABLE ? SingularAttributeSource.NaturalIdMutability.MUTABLE
: SingularAttributeSource.NaturalIdMutability.IMMUTABLE : SingularAttributeSource.NaturalIdMutability.IMMUTABLE
); );
}
processAttributes( attributeSources ); processAttributes( attributeSources );
return attributeSources; return attributeSources;
} }