You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added a callback capability to the "In" conditions that will be called before rendering when the conditions are empty. Also, removed the option that forced the library to render invalid SQL in that case. ([#241](https://github.com/mybatis/mybatis-dynamic-sql/pull/241))
16
+
- Added a utility mapper for MyBatis that allows you to run any select query without having to predefine a result mapping.
Copy file name to clipboardExpand all lines: src/site/markdown/docs/mybatis3.md
+118Lines changed: 118 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,124 @@ The goal of this support is to reduce the amount of boilerplate code needed for
5
5
6
6
With version 1.1.3, specialized interfaces and utilities were added that can further simplify client code. This support enables the creation of methods that have similar functionality to some of the methods generated in previous versions of MyBatis generator like countByExample, deleteByExample, and selectByExample. We no longer use the "by example" terms for these methods as this library has eliminated the Example class that was generated by prior versions of MyBatis Generator.
7
7
8
+
## Dynamic Result Mapping Support
9
+
MyBatis is very good at mapping result sets to objects - this is one of its primary differentiators. MyBatis also requires
10
+
that you predefine the mappings for every possibility. This presents a challenge if you want very dynamic column lists
11
+
in a query. This library provides a generalized MyBatis mapper that can assist with that problem.
12
+
13
+
The general mapper is `org.mybatis.dynamic.sql.util.mybatis3.GeneralMapper`. This mapper can be injected into a MyBatis configuration
14
+
as is, or it can be extended by an existing mapper. If you are using MyBatis Spring support and auto scanning for mappers,
15
+
you can create an extension in your application's mapper package as follows:
The goal of count method support is to enable the creation of methods that execute a count query allowing a user to specify a where clause at runtime, but abstracting away all other details.
0 commit comments