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

Michael Dick updated OPENJPA-365:
---------------------------------

    Fix Version/s: 1.2.0

> 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
>             Fix For: 1.2.0
>
>
> 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.

Reply via email to