Mybatis many to one, one to many processing

catalogue 1. Many to one processing 1.1 database design 1.2 nested processing by query 1.3 nesting by result 2. One to many processing 2.1. Nesting by result 3. Summary 1. Many to one processing 1.1 database design Entity class: @Data @AllArgsConstructor @NoArgsConstructor public class Student { private int id; private S ...

Added by inVINCEable on Sun, 26 Dec 2021 12:25:17 +0200

Mybatis handles sql statements

In this paper, the processing of sql statements by mybatis is mainly divided into compile time processing and execution time processing In addition, sql statements are divided into static sql statements and dynamic sql statements, which are distinguished by parameter modifiers. Static sql statement: no parameters or parameter modifiers are all ...

Added by digibrain on Sat, 25 Dec 2021 22:44:33 +0200

In depth study of MyBatis application analysis and best practices of MyBatis series 12_SSM framework plug in use and principle analysis of integrating MyBatis

In depth study of MyBatis application analysis and best practices of MyBatis series 12_SSM framework plug in use and principle analysis of integrating MyBatis Older procedural apes share knowledge while learning and recording I hope this article is meaningful to you, like, collect and comment Your support is the greatest encouragement t ...

Added by TitanKing on Sat, 25 Dec 2021 10:18:40 +0200

mybatis study notes 01

1 Introduction to mybatis MyBatis was originally an open source project ibatis of apache. In 2010, the project was migrated from apache software foundation to google code and renamed MyBatis. Moved to Github in November 2013. MyBatis is an excellent persistence layer framework. It encapsulates the process of jdbc operating the database, so tha ...

Added by name1090 on Fri, 24 Dec 2021 03:40:35 +0200

Mybatis3_ Mapping file

Mybatis mapping file The mapping file guides MyBatis how to add, delete, modify and query the database, which is of great significance. Cache – the cache configuration for this namespace.Cache ref – refers to the cache configuration of other namespaces.resultMap – describes how to load objects from the database result se ...

Added by DragonFire-N[R] on Thu, 23 Dec 2021 08:35:10 +0200

Mybatis source code - execution process of Executor

prefacestay Mybatis source code - SqlSession access It has been known in the article that when obtaining SqlSession in Mybatis, the Executor will be created and stored in SqlSession. The dynamic proxy object of the mapping interface can be obtained through SqlSession, and the generation of dynamic proxy object can be referred to Mybatis source ...

Added by Jas on Wed, 22 Dec 2021 21:01:38 +0200

Read the source code of MyBatis: PooledDataSource of database connection pool

This paper introduces the implementation principle of PooledDataSource. Data source configuration In mybatis config In the XML configuration file, you can configure the data source by setting the dataSource tag. <environments default="development"> <environment id="development"> <transactionManager type="JDBC"> ...

Added by ttmt on Mon, 20 Dec 2021 19:32:08 +0200

Mybatis: mapper. Dynamic SQL in XML

Through this article, you will see the following knowledge: How to handle the xml file <, >, < =, >=Use of if, where and foreach tags in dynamic sqlUse custom name for collection in foreachHow to deal with repeated sql statements Use of judgment class symbols in xml If the < sign is forbidden in the xml file, the judgment c ...

Added by Lenbot on Mon, 20 Dec 2021 09:22:53 +0200

IDEA+Maven uses MyBatis to realize CRUD operation (the content is detailed, and the 10000 word long article will take you to know MyBatis ~)

IDEA+Maven uses MyBatis to implement CRUD operation Hello, everyone. Today, I'm going to use Maven to build MyBatis project in IDEA to realize simple operations of addition, deletion, modification and query, After summarizing some experiences of bloggers in the learning process, let's enter the construction project Introduction to MyBa ...

Added by lifeless on Mon, 20 Dec 2021 05:41:29 +0200

[source code analysis] talk about your understanding of MyBatis result set mapping and parameter binding

[total] MyBatis result set mapping is that in the process of MyBatis parsing Mapper.xml mapping file, < ResultMap > tag will be parsed into ResultMap object. After MyBatis executes a select statement and obtains the ResultSet result set, it will be handed over to the associated ResultSetHandler for subsequent mapping processing. ResultSet ...

Added by melefire on Sun, 19 Dec 2021 19:30:54 +0200