IBatis (MyBatis): Working with Stored Procedures

stored_procedure_loiane

This tutorial will walk you through how to setup iBatis (MyBatis) in a simple Java project and will present how to work with stored procedures using MySQL. The goal os this tutorial is to demonstrate how to execute/call stored procedures using iBatis/MyBatis. Pre-Requisites For this tutorial I am using: IDE: Eclipse (you can use your favorite one)…

Continue reading

IBatis (MyBatis): Working with Dynamic Queries (SQL)

This tutorial will walk you through how to setup iBatis (MyBatis) in a simple Java project and will present how to work with dynamic queries (SQL). Pre-Requisites For this tutorial I am using: IDE: Eclipse (you can use your favorite one) DataBase: MySQL Libs/jars: Mybatis, MySQL conector and JUnit (for testing) This is how your project should look like: Sample Database…

Continue reading

IBatis (MyBatis): Handling Constructors

ibatis_mybatis_loiane

This tutorial will walk you through how to setup iBatis (MyBatis) in a simple Java project and will present an example using a class constructor with arguments. Pre-Requisites For this tutorial I am using: IDE: Eclipse (you can use your favorite one) DataBase: MySQL Libs/jars: Mybatis, MySQL conector and JUnit (for testing) This is how your project should look like: Sample…

Continue reading

IBatis (MyBatis): Handling Joins: Advanced Result Mapping, Association, Collections, N+1 Select Problem

This tutorial will walk you through how to setup iBatis (MyBatis) in a simple Java project and will present examples using advanced result mapings, how to hadle mappings with association, collections, n+1 problem and will show how to configure these relationships using XML configuration and annotations. Pre-Requisites For this tutorial I am using: IDE: Eclipse (you can…

Continue reading