| In version 5.2 of Hibernate ORM we renamed the Session#getFlushMode() method - which used to return org.hibernate.FlushMode to getHibernateFlushMode(). This was necessary to finally have Session directly extend EntityManager: since the JPA API also specifies that the EntityManager needs to have a method with that same name, while obviously returning the JPA defined return type rather than the Hibernate FlushMode, the method was conflicting so we had to remove the "native" Hibernate method. Clearly this broke the API, and while we thought back then that this was an acceptable compromise as it's a trivial fix, it seems there's a solution to maintain binary compatibility by introducing a synthetic bridge method. We should apply this so that, while people recompiling the project can easily amend the code, it will also work fine for people not recompiling their project it at all. David Lloyd created an handy tool to easily inject bridge methods, called JBoss Bridger: https://github.com/dmlloyd/bridger |