Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 09/Oct/12 4:51 PM
Description:

When a collection is bound by o.h.metamodel.internal.Binder#bindPluralAttribute, the binding's "resolved type" is set.

attributeBinding is a AbstractPluralAttributeBinding

final Type resolvedType = resolvePluralType( attributeBinding, nature );
		final HibernateTypeDescriptor hibernateTypeDescriptor = attributeBinding.getHibernateTypeDescriptor();
		ReflectedCollectionJavaTypes reflectedCollectionJavaTypes = typeHelper.getReflectedCollectionJavaTypes( attributeBinding );
		bindHibernateTypeDescriptor(
				hibernateTypeDescriptor,
				attributeSource.getTypeInformation(),
				defaultCollectionJavaTypeName( reflectedCollectionJavaTypes, attributeSource ) );
		bindHibernateResolvedType( hibernateTypeDescriptor, resolvedType );

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

pluralAttributeElementBinding is initialized by AbstractPluralAttributeBinding#interpretNature.

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

Test case to duplicate: o.h.test.annotations.beanvalidation.DDLTest

Fix Versions: 5.0.0
Project: Hibernate ORM
Priority: Major Major
Reporter: Brett Meyer
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