You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Richard Zowalla (Jira)" <ji...@apache.org> on 2026/08/29 17:24:00 UTC

[jira] [Assigned] (OPENJPA-2968) IdClass paths swallow exceptions and rely on field order

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

Richard Zowalla reassigned OPENJPA-2968:
----------------------------------------

    Assignee: Richard Zowalla

> IdClass paths swallow exceptions and rely on field order
> --------------------------------------------------------
>
>                 Key: OPENJPA-2968
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2968
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 4.2.0
>            Reporter: Maxim Solodovnik
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> Discussion thread: https://github.com/apache/openjpa/pull/144#discussion_r3683003006
> **(medium)** The IdClass reconstruction/extraction paths `catch (Exception)` and silently continue (here the field stays null; in `toDataStoreValue` at line 227 the PK columns get nulls written). Swallowing exceptions around primary-key values risks silently persisting/loading corrupt identities - at minimum a warn log, arguably a StoreException. Also `getInstanceFields` (line 448) maps IdClass fields to columns by `getDeclaredFields()` order, which the JVM does not guarantee - matching by name would be safer.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)