PersistenceManager pm = PMF.get().getPersistenceManager();
Query qPostings = pm.newQuery(Postings.class);
qPostings.setFilter("account_id == id");
qPostings.declareParameters("Integer id");
try {
List<Postings> res = (List<Postings>)qPostings.execute(5492);
if(res.iterator().hasNext()) {
for(Postings e : res) {
out.print(e.getAccountId() + "<br />");
}
}
else {
out.print("no results");
}
}
finally {
qPostings.closeAll();
}
pm.close();
the above is my codes.
when I run http://lookingforfour.appspot.com/ in the IE, this error
occurs:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this
error message and the query that caused it.
BTW,
when I do a search in datastore of the admin console, and GQL is
"SELECT * FROM Postings WHERE account_id = 5492", it works.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---