I\'m having problems persisting entities in my Spring application. Just doing em.merge() finishes without errors but does not update the database, and trying
em.merge()
Add this to your datasource file/config
hibernate.allow_update_outside_transaction: true
It should work, but be sure of your production environment though