Hello,

I get following error:

Problem with query <SELECT FROM de.hsowl.google.evaluation.model.Appointment 
WHERE userPara == createdBy PARAMETERS String userPara>: Unexpected expression 
type while parsing query: org.datanucleus.query.expression.ParameterExpression
>
>
the Method:
public List<Appointment> getAppointments(User user)
 {
 PersistenceManager pm = PMF.get().getPersistenceManager();
 Query q = pm.newQuery(Appointment.class);
 q.setFilter("userPara == createdBy");
 q.declareParameters("String userPara");
 List<Appointment> queryResult = (List<Appointment>) q.execute(user.
getUserId());
 return queryResult;
 }


The important part of the object

@PersistenceCapable(detachable = "true")
public class Appointment implements javax.jdo.listener.StoreCallback
{
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private String createdBy; //contains the userid
...
}


How can I declare the Parameter correct? 

Have a nice day
Benjamin

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/ab15e4e1-663d-489d-9fab-c4c01aee68f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to