You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Pinaki Poddar (JIRA)" <ji...@apache.org> on 2008/07/16 06:01:31 UTC
[jira] Resolved: (OPENJPA-365) Unexpected behavior on finding a
Composite Key entity with a single value.
[ https://issues.apache.org/jira/browse/OPENJPA-365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar resolved OPENJPA-365.
-----------------------------------
Resolution: Fixed
> Unexpected behavior on finding a Composite Key entity with a single value.
> --------------------------------------------------------------------------
>
> Key: OPENJPA-365
> URL: https://issues.apache.org/jira/browse/OPENJPA-365
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Environment: Windows XP, JDK 1.5, OpenJPA 0.9.7
> Reporter: Gene Wu
> Assignee: Pinaki Poddar
>
> Entity A has a composite key AId, thus User should look up A with an instance of AId.
> Example: em.find(A.class, new AId());
> In case of looking up A with a single value, for example: em.find(A.class, 12345). It will through an unexpected exception:
> >>>The id type "AId" specfied by persistent type "A" does not have a public string or class + string constructor.
> >>>>> org.apache.openjpa.kernel.BrokerImpl.newObjectId
> >>>>> (BrokerImpl.java:1120)
> >>>>> [WLServer TmsServer] at
> >>>>> org.apache.openjpa.kernel.DelegatingBroker.newObjectId
> >>>>> (DelegatingBroker.java:254)
> >>>>> [WLServer TmsServer] at
> >>>>> org.apache.openjpa.persistence.EntityManagerImpl.find
> >>>>> (EntityManagerImpl.java:345)
> I suppose to get an exception of error id type.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.