openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gene Wu (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-365) Unexpected behavior on finding a Composite Key entity with a single value.
Date Wed, 12 Sep 2007 01:58:32 GMT
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


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.


Mime
View raw message