HHH-17041 Embeddable and Generics throws IllegalArgumentException
This commit is contained in:
parent
0f5008ca3f
commit
18de71edff
|
@ -363,14 +363,19 @@ public class ClassPropertyHolder extends AbstractPropertyHolder {
|
||||||
actualProperty.setValue( context.getMetadataCollector().getGenericComponent( componentClass ) );
|
actualProperty.setValue( context.getMetadataCollector().getGenericComponent( componentClass ) );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final Iterator<Property> propertyIterator = component.getPropertyIterator();
|
if ( componentClass == Object.class ) {
|
||||||
while ( propertyIterator.hasNext() ) {
|
// Object is not a valid component class, but that is what we get when using a type variable
|
||||||
Property property = propertyIterator.next();
|
component.getProperties().clear();
|
||||||
try {
|
}
|
||||||
property.getGetter( componentClass );
|
else {
|
||||||
}
|
final Iterator<Property> propertyIterator = component.getPropertyIterator();
|
||||||
catch (PropertyNotFoundException e) {
|
while ( propertyIterator.hasNext() ) {
|
||||||
propertyIterator.remove();
|
try {
|
||||||
|
propertyIterator.next().getGetter( componentClass );
|
||||||
|
}
|
||||||
|
catch (PropertyNotFoundException e) {
|
||||||
|
propertyIterator.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ import org.hibernate.property.access.internal.PropertyAccessStrategyIndexBackRef
|
||||||
import org.hibernate.property.access.spi.BuiltInPropertyAccessStrategies;
|
import org.hibernate.property.access.spi.BuiltInPropertyAccessStrategies;
|
||||||
import org.hibernate.property.access.spi.PropertyAccess;
|
import org.hibernate.property.access.spi.PropertyAccess;
|
||||||
import org.hibernate.property.access.spi.PropertyAccessStrategy;
|
import org.hibernate.property.access.spi.PropertyAccessStrategy;
|
||||||
import org.hibernate.service.ServiceRegistry;
|
|
||||||
import org.hibernate.type.descriptor.java.JavaType;
|
import org.hibernate.type.descriptor.java.JavaType;
|
||||||
import org.hibernate.type.descriptor.java.spi.JavaTypeRegistry;
|
import org.hibernate.type.descriptor.java.spi.JavaTypeRegistry;
|
||||||
import org.hibernate.type.internal.CompositeUserTypeJavaTypeWrapper;
|
import org.hibernate.type.internal.CompositeUserTypeJavaTypeWrapper;
|
||||||
|
|
Loading…
Reference in New Issue