[
https://issues.apache.org/jira/browse/OPENJPA-2947?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla resolved OPENJPA-2947.
--------------------------------------
Resolution: Not A Problem
Looking at the code in JDBCStoreManager.setInverseRelation(): the loop walks
the elements of an eagerly loaded collection and sets the inverse relation as a
best-effort optimisation. A broken enhancement or a missing agent would already
fail earlier at the (PersistenceCapable) o cast, so a null state manager here
does not indicate that. It legitimately occurs for elements that are not
managed by this broker (detached or otherwise unmanaged instances held in the
collection), and the same is true for a null ClassMapping. Skipping those
elements only skips the optimisation and matches the behaviour before the
change; throwing would turn a harmless case into a runtime failure. Closing as
Not A Problem.
> Null state manager cases should throw instead of skip
> -----------------------------------------------------
>
> Key: OPENJPA-2947
> URL: https://issues.apache.org/jira/browse/OPENJPA-2947
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Assignee: Romain Manni-Bucau
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion link:
> https://github.com/apache/openjpa/pull/144#discussion_r3426807128
> wonder if these null cases shouldn't throw, means enhancement is broken or
> setup (agent) is broken no?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)