-
Notifications
You must be signed in to change notification settings - Fork 148
UnitOfWorkQueryValueHolder is not wrapped properly #2461
Copy link
Copy link
Labels
Milestone
Description
See forum topic.
Steps:
- Download and run project: unfetch.zip
- Open Blank Screen
- Press upper button, then bottom button
ER: No exceptions
AR:
java.lang.IllegalStateException: Cannot get unfetched attribute [infoEntity] from detached object com.company.jmix_unfetch.entity.LastEntity-92a4bf42-6755-3b2a-c5ba-2badd96853f2 [detached].
at org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.throwUnfetchedAttributeException(UnitOfWorkValueHolder.java:326)
at org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:106)
at com.company.jmix_unfetch.entity.LastEntity._persistence_get_infoEntity(LastEntity.java)
at com.company.jmix_unfetch.entity.LastEntity.getInfoEntity(LastEntity.java:25)
at com.company.jmix_unfetch.screen.blank.BlankScreen.onReadClick(BlankScreen.java:49)
at io.jmix.core.common.event.EventHub.publish(EventHub.java:170)Cause:
UnitOfWorkQueryValueHolder is not wrapped for infoEntity property in deeply nested entity LastEntity, because it is already loaded despite absence in fetch plan.
see io.jmix.eclipselink.impl.lazyloading.JpaLazyLoadingListener#processValueHolders
Possible solutions:
a. Prevent excessive loading
b. Modify wrapping logic
c. leave as is if there are no "good" solutions
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Review