Relation fields fail to load and existing entities considered orphaned under a
certain class hierarchy.
-------------------------------------------------------------------------------------------------------
Key: OPENJPA-561
URL: https://issues.apache.org/jira/browse/OPENJPA-561
Project: OpenJPA
Issue Type: Bug
Affects Versions: 1.0.1
Reporter: Ron Pressler
Consider the following class hierarchy
S
|_ F
|_ B
|_ B1
|_ B2
Inheritance strategy is JOINED, there is use of a discriminator column, and a
foreign relation exists between F and B, in our setup the relation was
OneToMany from B to F (i.e. F is the owning side).
The DB contains a single F instance related to a single B1 instance.
The following JPQL queries are performed:
SELECT b FROM B2 b
SELECT f FROM F f
Then:
We receive a warning saying that the B1 instance is orphaned AND the field in
the F instance pointing to the B1 instance remains null.
This only happens when B and F both extend S. In that case the
VerticalClassStrategy causes the bug. From what little we gleaned, it seems
that OpenJPA attempts to extract the concrete type of F's reference to B
(should be B1) from the wrong sql query, resulting in an object id of type F
and id of the B1 instance. This oid is corrupt.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.