Hibernate / MyBatis Interview questions
What is MyBatis?
MyBatis is an open-source Java persistence framework that maps SQL statements to Java methods, letting developers write and control their own SQL directly while MyBatis handles the mechanical work of parameter binding, executing the statement, and mapping the result set back into Java objects.
It began as iBATIS (an Apache project), was later renamed MyBatis and moved to Google Code and then GitHub as an independent project, and today it's maintained by the MyBatis community as a standalone open-source project distinct from any single company's product.
Unlike a full ORM like Hibernate, which generates SQL on your behalf from an object-relational mapping, MyBatis takes a "SQL-first" approach: developers write the actual SQL themselves, either in XML mapper files or via annotations, and MyBatis's job is bridging that hand-written SQL to Java method calls and typed results rather than generating the SQL from a higher-level object mapping.
More Related questions...