openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-561) Relation fields fail to load and existing entities considered orphaned under a certain class hierarchy.
Date Wed, 16 Jul 2008 05:59:31 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pinaki Poddar resolved OPENJPA-561.
-----------------------------------

    Resolution: Cannot Reproduce
      Assignee: Pinaki Poddar

Not reproducible on trunk. 
The attached test passes on trunk.
The reporter should verify if the test reflects their scenario accurately and if not then
submit reproducible test case to reopen. 

> 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
>            Assignee: Pinaki Poddar
>         Attachments: OPENJPA-561.zip
>
>
> 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.


Mime
View raw message