Hello;

I am using 3.1 snapshot and am trying to do this in order to get an DataObject 
instance for the ObjectId which I have;

        DataContext dc = new DataContext();
        ObjectId xyzObjectId = xyzObjectIds.get(i);
        XYZ xyz = (XYZ) dc.performQuery(new ObjectIdQuery(xyzObjectId)).get(0);

I get an NPE here;

        
org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQueryAction.java:335)
 at                         
org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQueryAction.java:96)
 at                           
org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1049) at         
                                        
org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1038)

Which is this in code;

        protected void runQuery()
        { this.response = actingContext.getChannel().onQuery(actingContext, 
query); }

The problem is that there is no channel on the context.

Am I using the API correctly?

Regards;

___
Andrew Lindesay
www.lindesay.co.nz

Reply via email to