Change By: Brett Meyer (11/Oct/12 3:32 PM)
Description: When a collection is bound by Test case to duplicate:  o.h. metamodel test . internal annotations . Binder#bindPluralAttribute, the binding's "resolved type" is set beanvalidation . DDLTest

attributeBinding Tv.Tuner  is  a AbstractPluralAttributeBinding

{code}
final Type resolvedType = resolvePluralType( attributeBinding, nature );
final HibernateTypeDescriptor hibernateTypeDescriptor = attributeBinding
 an @Embedded static class . getHibernateTypeDescriptor();
ReflectedCollectionJavaTypes reflectedCollectionJavaTypes = typeHelper.getReflectedCollectionJavaTypes( attributeBinding );
bindHibernateTypeDescriptor(
hibernateTypeDescriptor
  When the attribute is built ,
attributeSource.getTypeInformation(),
defaultCollectionJavaTypeName( reflectedCollectionJavaTypes, attributeSource ) );
bindHibernateResolvedType( hibernateTypeDescriptor, resolvedType );
{code}

AbstractPluralAttributeBinding#pluralAttributeElementBinding also has
 it should get  a  type descriptor, but the descriptor and its resolved type are never set  MappedAttribute .   This causes NPEs in dozens of tests Nature .

pluralAttributeElementBinding is initialized by AbstractPluralAttributeBinding#interpretNature
EMBEDDED nature .

Further
  Instead , it  appears AbstractPluralAttributeElementBinding#hibernateTypeDescriptor cannot be set period, as it doesn ' t have a setter or constructor arg s currently assigned MappedAttribute .

Test case to duplicate: o
Nature . h BASIC . test   This causes issues later on -- a plural attribute binding is attempted and ultimately causes an NPE . annotations.beanvalidation.DDLTest
Assignee: Brett Meyer
Summary: NPE in collection's AbstractPluralAttributeBinding @Embedded static class should use EMBEDDED nature, not BASIC
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira