I'm trying to use jpa with the app engine datastore.
Persistence is fine, though I can't seem to get any of the objects I persisted in the db.
Here is the method I made :
public List getAllBooks() {
EntityManager em = EMF.get().createEntityManager(); Query query = em.createQuery("select b from Book b"); List<Book> books = (List<Book>) query.getResultList(); em.close(); return books;
}
The odd thing is when I debug and look at my list of results, there is some things I don't understand :
1 - my List seems to be actually a StreamingQueryResult, and its size is -1
2 - when I searched in this StreamingQueryResult, I realized the 3 books I have in my db are actually in an arraylist called resolvedPojos which is in LazyResult, but I don't know how to get them.
Has anyone got an idea ?