> Instead of flushing, did you try a PersistenceManager.close() that
> should lead to the same effect ? After the close, you get a new pm via
> the PMF and that should do it.

i dunno if i can do that so easily as the entityManager is injected by
spring.

i have a very very very simple example that doesnt not work under gae/
spring.

what do i need to get this to work under gae?

this test case *works* fine under hibernate but fails with gae with a
assert after the query.

any ideas?

@SuppressWarnings("unchecked")
        @Test
    public void findUserSimple() {
                PositionUser user1 = new PositionUser();
        user1.setFirstName("john");
        user1.setLastName("smith");
        user1.setFacebook("111111");
        em.persist(user1);
        em.refresh(user1);
        System.out.println( "key:" + user1.getKey());
        PositionUser find = em.find(PositionUser.class, user1.getKey());
        assertNotNull(find);

        Query query = em.createQuery("Select p from PositionUser p where
p.firstName=:firstname");
        query.setParameter("firstname", user1.getFirstName());
        List resultList = query.getResultList();
        assertEquals( 1, resultList.size() ); <--- assert fails here

        }

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-java?hl=en.

Reply via email to