Hi all.
Short version:
org.eclipse.persistence.internal.descriptors.PersistenceObjectInstantiationPolicy.buildNewInstance()
calls _persistence_new which seems to return an object not
initialized by the default-construcotor.
[snip]
The entity containing the @Embeddable in question is
@Cacheable and removing the @Cacheable annotation from it
makes this problem go away.
This is due to the following code:
org.eclipse.persistence.mappings.AggregateMapping.mergeIntoObject()
line 668:
if (targetAttributeValue == null || targetAttributeValue ==
sourceAttributeValue ||
!targetAttributeValue.getClass().equals(sourceAttributeValue.getClass()))
{
Without caching, the targetAttributeValue "is not same
as" sourceAttributeValue but when the entity is @Cacheable
the memory-equals test passes and makes the code call
buildNewMergeInstanceOf() which returns the invalid object
(with all fields set to null).
However - I'd really like this entity to keep being
@Cacheable so I'd appreciate a fix to this problem.
How can one argue that it will *ever* be OK to execute the
weaved-in constructor instead of the default-constructor (if
defined)?
Is there a way to disable execution of the weaved-in
default-constructor only, or does one have to turn off internal
weaving all together using eclipselink.weaving.internal=false?
Thanks.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users