File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
hibernate-core/src/main/java/org/hibernate/boot/model/internal Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -326,13 +326,10 @@ static void prepareActualProperty(
326326 null ,
327327 context .getBootstrapContext ().getReflectionManager ()
328328 );
329- final Value originalValue = prop .getValue ();
330- if ( originalValue instanceof SimpleValue ) {
329+ if ( declaredProperty .isTypeResolved () ) {
331330 // Avoid copying when the property doesn't depend on a type variable
332- if ( inferredData .getTypeName ().equals ( getTypeName ( prop ) ) ) {
333- propertyConsumer .accept ( prop );
334- return ;
335- }
331+ propertyConsumer .accept ( prop );
332+ return ;
336333 }
337334 // If the property depends on a type variable, we have to copy it and the Value
338335 final Property actualProperty = prop .copy ();
@@ -348,6 +345,7 @@ static void prepareActualProperty(
348345// collection.setOwner( null );
349346 collection .setRole ( type .getName () + "." + prop .getName () );
350347 // To copy the element and key values, we need to defer setting the type name until the CollectionBinder ran
348+ final Value originalValue = prop .getValue ();
351349 context .getMetadataCollector ().addSecondPass (
352350 new SecondPass () {
353351 @ Override
You can’t perform that action at this time.
0 commit comments