I have a simple question regarding the ORM used by Alfresco CMS. As I understand in the previous versions, Hibernate was used as the ORM layer which was later updated to iBatis. In our current project, we are using myBatis for the different database connections, hence we would like to maintain the consistency across. So my question is that is it possible to use myBatis instead of iBatis while using Alfresco CMS.
Kindly point me to the right direction or documentation.
Hibernate hasn't been used (as primary ORM) in a long time (since 4.0 only for jBPM, which was removed in 5.1/5.2). The Hibernate library continues to be used as a technical dependency, primarily to determine the database dialect to be used and for some transaction handling support. Alfresco is using myBatis (successor of ibatis) and of course you can use myBatis for custom database connections. You just have to use the version shipped with Alfresco and not include your own to avoid any conflicts.
You'll find an example of custom ibatis handling in one of my addons - the Acosix alfresco-audit. In this addon, I am using ibatis for custom queries against the Alfresco database (modifying this example to use a different database is a trivial example). Among the various config files, take a look at the dao-context.xml and the ibatis mapping for different dialects. The only thing not covered in this would be transaction handling for a non-Alfresco database.