Search code examples
hibernatejpaormibatis

Switch Hibernate to iBatis


Currently we are using Hibernate as Persistent Provider for JPA. Is it possible to change later as iBatis. If we change what are the things I need to consider?


Solution

  • Likely you don't want to use already graved iBatis, but maybe MyBatis.

    As you see from the documentation, concept is quite different from JPA and Hibernate. You cannot reuse:

    • mappings for entities
    • JPQL queries.
    • any setup

    What you can partially reuse, is entities (only code without jpa mappings) and native queries (queries itself, not annotations).