You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org> on 2008/02/03 22:25:32 UTC

[JIRA] Updated: (CAY-574) DataObjectUtils 'objectForPK' should work on the client

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

Andrus Adamchik updated CAY-574:
--------------------------------

        Fix Version/s:     (was: UNDEFINED FUTURE)
                       3.0
    Affects Version/s: 3.0
                       2.0 [STABLE]

setting Jira fix version

> DataObjectUtils 'objectForPK' should work on the client
> -------------------------------------------------------
>
>                 Key: CAY-574
>                 URL: https://issues.apache.org/cayenne/browse/CAY-574
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Cayenne Core Library
>    Affects Versions: 1.2 [STABLE], 2.0 [STABLE], 3.0, UNDEFINED FUTURE
>            Reporter: Andrus Adamchik
>            Assignee: Kevin Menard
>             Fix For: 3.0
>
>
> While DataObjectUtil.objectForPK takes ObjectContext as an argument, using it on the remote client is not possible. The following exceptions happen on various overloaded calls:
> 1. This will require method signature change:
> DataObjectUtils.objectForPK( c1,new ObjectId("MtTable1", "TABLE1_ID", 1));
> java.lang.ClassCastException
> 	at org.objectstyle.cayenne.DataObjectUtils.objectForPK(DataObjectUtils.java:276)
> 	at org.objectstyle.cayenne.remote.ClientChannelEventsTst.testSyncSimpleProperty(ClientChannelEventsTst.java:93)
> 	
> 2. This should issue a query instead of doing DbEntity lookup:
>    DataObjectUtils.objectForPK(
>                 c2,
>                 ClientMtTable1.class,
>                 1);
> org.objectstyle.cayenne.CayenneRuntimeException: [v.@CAYENNE_VERSION@ @CAYENNE_BUILD_DATE@] No DbEntity for ObjEntity: MtTable1
> 	at org.objectstyle.cayenne.DataObjectUtils.buildId(DataObjectUtils.java:352)
> 	at org.objectstyle.cayenne.DataObjectUtils.objectForPK(DataObjectUtils.java:167)
>      

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [JIRA] Updated: (CAY-574) DataObjectUtils 'objectForPK' should work on the client

Posted by Kevin Menard <km...@servprise.com>.
Sorry about that.  I was so excited to close it that I wasn't even paying
attention ;-)

-- 
Kevin


On 2/3/08 4:25 PM, "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org> wrote:

> 
>      [ 
> https://issues.apache.org/cayenne/browse/CAY-574?page=com.atlassian.jira.plugi
> n.system.issuetabpanels:all-tabpanel ]
>