ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From schernolys <sergey.chernol...@gmail.com>
Subject Problem with transactions in Apache Ignite!
Date Wed, 20 Sep 2017 09:52:24 GMT
Hi!
I am use of contributors of project "Hibernate OGM". I am preparing my PR
for the project.
I have a question.
Problem is that part of tests is failed after migration from Ignite 1.9 to
Ignite 2.1. These tests uses one feature (session.flush()).
____________________
                em.getTransaction().begin();
                Poem poem = new Poem();
                poem.setName("L'albatros");
                em.persist(poem);
                em.getTransaction().commit();
                em.clear();
                em.getTransaction().begin();
                Poem poem2 = new Poem();
                poem2.setName("Wazaaaaa");
                em.persist(poem2);
                em.flush(); //*data not flushed to Ignite's cache*
               
Assertions.assertThat(TestHelper.getNumberOfEntities(em)).isEqualTo(2L);
                em.getTransaction().rollback();
               
Assertions.assertThat(TestHelper.getNumberOfEntities(em)).isEqualTo(1L);
____________________

Please comment situation with em.flush()




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message