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(
326
326
null ,
327
327
context .getBootstrapContext ().getReflectionManager ()
328
328
);
329
- final Value originalValue = prop .getValue ();
330
- if ( originalValue instanceof SimpleValue ) {
329
+ if ( declaredProperty .isTypeResolved () ) {
331
330
// 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 ;
336
333
}
337
334
// If the property depends on a type variable, we have to copy it and the Value
338
335
final Property actualProperty = prop .copy ();
@@ -348,6 +345,7 @@ static void prepareActualProperty(
348
345
// collection.setOwner( null );
349
346
collection .setRole ( type .getName () + "." + prop .getName () );
350
347
// 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 ();
351
349
context .getMetadataCollector ().addSecondPass (
352
350
new SecondPass () {
353
351
@ Override
You can’t perform that action at this time.
0 commit comments