I’m trying to have my GAE app pull some records from the Datastore but keep getting this:
javax.persistence.PersistenceException: Class PersistableItem for query has not been resolved. Check the query and any imports specification
It’s from the method here:
public List<PersistableItem> listItems() {
EntityManager em = EMFService.get().createEntityManager();
// Read the existing entries
Query q = em.createQuery("select * from PersistableItem");
List<PersistableItem> items = q.getResultList();
return items;
}
From what I’ve read this is about importing my PersistableItem class but I’m confused as I already do that in the .java code files.
The error message is strange, so this might not be your only error, but your query is wrong. select * is SQL, not JPQL. The correct query is