cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Lindesay <>
Subject ObjectIdQuery Question
Date Sun, 07 Feb 2010 10:21:33 GMT

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;

at 			org.apache.cayenne.util.ObjectContextQueryAction.execute(
at 				org.apache.cayenne.access.DataContext.onQuery( at 						org.apache.cayenne.access.DataContext.performQuery(

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?


Andrew Lindesay

View raw message