Have we ever thought about providing container-agnostic persistence layer using JPA over Hibernate & Spring from OpenMRS?
However, looking at the example and also how the hibernate session factory is configured I am not sure if we can really leverage “EntityManager” abstraction. If we are going to leverage JPA, then I think it ought to be ORM library agnostic. In the example here, we are still using hibernate session factory and just leveraging the annotations.
Note, to do this, we would change in core for how we configure our dataSource, transaction manager etc.
Do we want to do this?