title: Migration Large Java App from MyBatis to ORM
body: <p>this question is more of a broad idea to replace the myBatis with Hibernate ORM.</p>
  
  <p>I tried to google but couldn't find any solution for this.</p>
  
  <p>So currently we are using MyBatis with the following structure:</p>
  
  <pre><code>    some-module
      some-module
      some-module
          domain.model
              SomeDBO 
              SomeDBO
          domain.repository
              some-mapper.xml // &lt;--- this contains resultMap &amp; sql queries
              some-mapper.xml // &lt;--- this contains resultMap &amp; sql queries
      some-module
          src.main.java.resources
              mybatis.xml // &lt;--- This contains referece for typeAliases &amp; mappers
  
  </code></pre>
  
  <p>Now the problem is mostly we don't have to write the complex queries to get or insert data.
  But as our application is growing maintaining SQL queries is becoming a pain in the ass.</p>
  
  <p>So we are thinking to somehow move from MyBatis to <a href="https://hibernate.org/orm/" rel="nofollow noreferrer">Hibernate ORM</a> to reduce maintain/creating the SQL.</p>
  
  <p>I know MyBatis also supported the generator but I'm not looking into that option.</p>
  
  <p>The possible solution which I'm thinking is to somehow maintain the backward compatibility with MyBatis and write new features with Hibernate ORM and gradually remove the MyBatis from the codebase.</p>