openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Vorburger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-953) ArrayIndexOutOfBoundsException in org.apache.openjpa.util.ApplicationIds$PrimaryKeyFieldManager.retrieve
Date Wed, 04 Mar 2009 09:19:56 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678655#action_12678655
] 

Michael Vorburger commented on OPENJPA-953:
-------------------------------------------

I actually found a work-around, for the attached test, do as follows: No DictLanguageLabelId
extends DictLabelId (and no @IdClass on DictLanguageLabelEntity), and make DictLabelId not
abstract.  Then add the following to the DictLabelEntity to "double map" that "object_dict_id"
column (which is also mapped in the DictLanguageLabelEntity subclass), and remove the @Id
from the forLanguage in DictLanguageLabelEntity:

    @Id
    @Basic(optional = false)
    @javax.persistence.Column(name = "object_dict_id", nullable = false)
    private long objectRef;

and add a public long objectRef; to the DictLabelId (with updated equals() and hashCode()).
 seems to work, but is clearly a work-around for this bug...

> ArrayIndexOutOfBoundsException in org.apache.openjpa.util.ApplicationIds$PrimaryKeyFieldManager.retrieve
> --------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-953
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-953
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Michael Vorburger
>         Attachments: test-jpa2.0.zip
>
>
> As per the email thread "ArrayIndexOutOfBoundsException in org.apache.openjpa.util.ApplicationIds$PrimaryKeyFieldManager.retrieve"
on users@openjpa.apache.org yesterday (see http://n2.nabble.com/ArrayIndexOutOfBoundsException-in-org.apache.openjpa.util.ApplicationIds%24PrimaryKeyFieldManager.retrieve-tt2417570.html#a2417570),
there is a confirmed (Fay Wang) openjpa bug when using  application ID Identity Hierarchies
as per http://openjpa.apache.org/builds/1.2.0/apache-openjpa-1.2.0/docs/manual/jpa_overview_pc_identity.html#jpa_overview_pc_identity_hierarchy,
may be because I was trying to use them together with Entities as Identity Fields as per
> http://openjpa.apache.org/builds/1.2.0/apache-openjpa-1.2.0/docs/manual/ref_guide_pc_oid.html#ref_guide_pc_oid_entitypk.

-- 
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