{"issue":{"title":"get all query doesn't work","user":{"id":1280241,"login":"fcaballero","url":"https://api.github.com/users/fcaballero","avatar_url":"https://secure.gravatar.com/avatar/2d5ed2f3439a965df3d7b3ca09157b4d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2d5ed2f3439a965df3d7b3ca09157b4d"},"milestone":null,"created_at":"2011-12-22T15:27:05Z","labels":[],"state":"open","updated_at":"2011-12-22T15:27:05Z","id":2638256,"html_url":"https://github.com/impetus-opensource/Kundera-Examples/issues/5","closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"hi, well i hope that you can understand me, i'm trying to execute a little test about how insert and get data with cassandra following your examples, but making debug, when i try to get all the data stored in DB i saw that i always get the last data that i have inserted making a simple query  (select u from User u).\r\n\r\nfor example: i insert this\r\n\r\nem.persist(user1)\r\nem.persist(user2)\r\n\r\nand i get a list with user1 and user2\r\n\r\nand then i insert this\r\n\r\nem.persist(user3)\r\nem.persist(user4)\r\n\r\nand i expect a list with user1, user2, user3 and user4 but i get a list with user3 and user4\r\n\r\ni don't what is going on.. :S\r\n\r\nwell i need a litlle help with this i hope..can find it :P\r\n\r\nthis is the test code, thanks:\r\n\r\npublic void testApp()\r\n    {\r\n        User user = new User();\r\n        user.setUserId(\"0001\");\r\n        user.setFirstName(\"Juanito\");\r\n        user.setLastName(\"Gomez\");\r\n        user.setCity(\"Madrid\");\r\n        \r\n        User user2 = new User();\r\n        user.setUserId(\"0002\");\r\n        user.setFirstName(\"Pepito\");\r\n        user.setLastName(\"Gomez\");\r\n        user.setCity(\"Madrid\");\r\n        \r\n        EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"cassandra_pu\");\r\n        EntityManager em = emf.createEntityManager();\r\n        \r\n        em.persist(user);\r\n        em.persist(user2);\r\n        em.clear();\r\n        em.close();  \r\n        \r\n        user = new User();\r\n        user.setUserId(\"0003\");\r\n        user.setFirstName(\"Felipe\");\r\n        user.setLastName(\"Gomez\");\r\n        user.setCity(\"Madrid\");\r\n        \r\n        user2 = new User();\r\n        user.setUserId(\"0004\");\r\n        user.setFirstName(\"Sara\");\r\n        user.setLastName(\"Gomez\");\r\n        user.setCity(\"Madrid\");\r\n        \r\n        em = emf.createEntityManager();\r\n        \r\n        em.persist(user);\r\n        em.persist(user2);\r\n        em.clear();\r\n        em.close();  \r\n        \r\n        em = emf.createEntityManager();\r\n        em.clear();      \r\n        \r\n        Query q = em.createQuery(\"select u from User u\");       \r\n        List<User> requestInfos  = (List<User>)q.getResultList();\r\n        \r\n        \r\n        em.close(); \r\n        emf.close(); \r\n    }\r\n\r\n","number":5,"url":"https://api.github.com/repos/impetus-opensource/Kundera-Examples/issues/5","comments":0,"assignee":null},"action":"opened"}