Introduction

MyBatis is a persistence framework for Java, so you can use it in Scala as any other java library, nonetheless the main API is too java centric, it uses Java annotations and external xml files where you put your SQL.

The MyBatis Scala API is a lightweight wrapper, it supports a 100% of the framework functionality, taking advantage of the elegant Scala syntax and its type system. With this API you can use the Scala collections and "Scala beans", and you can define all your dynamic SQL code directly in your scala code without String concatenation and with very clear syntax.

Appart from the main configuration xml file where you define the datasource and transaction configurations, you will avoid use of external xml files and java Annotations.

The main documentation is at the core project: mybatis-scala-core

There are some examples here: mybatis-scala-samples