views:

37

answers:

1

I have a property oldStatus and newStatus in my object and when I try to run a query on the object where newStart = approved. I am getting an error.

Seems like the newStatus is being treated as new Status() and getting an exception that object Status not found.

Anyone with similar issue? and possible solution.

Query query = pm.newQuery(Inquiry.class, " newStatus == 'CANCELED' ");

or

Query query = pm.newQuery(Inquiry.class); 
query.setFilter("newStatus == statusParam"); 
query.declareParameters("String statusParam");
List<Inquiry> pis = (List<Inquiry>)query.execute("CANCELLED");

CreatorExpression defined with class of Status yet this class is not found

+1  A: 

stausParam != statusParam .. typo ?

h3xStream
sry that was a typo. The problem still exists.
Oceandrive