Skip to content

Commit 0ccf4da

Browse files
committed
3.3.8
1 parent 49cd4d6 commit 0ccf4da

File tree

4 files changed

+34
-6
lines changed

4 files changed

+34
-6
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,15 @@ http://repo1.maven.org/maven2/javax/persistence/persistence-api/1.0/
108108

109109
##[更新日志](http://git.oschina.net/free/Mapper/blob/master/wiki/Changelog.md)
110110

111-
##3.3.8-SNAPSHOT - 2016-03-19
111+
##最新版本3.3.8 - 2016-03-23
112112

113+
* `Example``andIn``andNotIn`方法参数改为`Collection` #109
113114
* 解决ResultMapping.Builder3.2.6版本新增`lazy`方法导致无法兼容3.2.4~3.2.5版本的问题,仍然兼容3.2.4+
115+
* 解决github[#12](https://github.com/abel533/Mapper/issues/12) 问题
116+
* 解决#107
117+
* 解决和分页插件PageHelper中orderBy默认属性名相同导致排序的错误
114118

115-
##最新版本3.3.7 - 2016-03-12
119+
###3.3.7 - 2016-03-12
116120

117121
* `Example`增加`orderBy`方法,使用属性进行排序,例如:`example.orderBy("id").desc().orderBy("countryname").orderBy("countrycode").asc();`
118122
* 当实体类包含数组类型的字段时,在`resultMap`中不使用`javaType`,这种情况如果出错,可以通过`@ColumnType`注解设置`jdbcType` #103

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<groupId>tk.mybatis</groupId>
3030
<artifactId>mapper</artifactId>
31-
<version>3.3.8-SNAPSHOT</version>
31+
<version>3.3.8</version>
3232
<packaging>jar</packaging>
3333

3434
<name>mapper</name>

src/test/java/tk/mybatis/mapper/test/example/TestSelectByExample.java

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
import tk.mybatis.mapper.mapper.MybatisHelper;
3535
import tk.mybatis.mapper.model.Country;
3636

37-
import java.util.ArrayList;
38-
import java.util.Arrays;
39-
import java.util.List;
37+
import java.util.*;
4038

4139
/**
4240
* @author liuzh
@@ -79,6 +77,24 @@ public void testAndExample() {
7977

8078
@Test
8179
public void testSelectByExampleInNotIn() {
80+
SqlSession sqlSession = MybatisHelper.getSqlSession();
81+
try {
82+
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
83+
Example example = new Example(Country.class);
84+
Set<Integer> set = new HashSet<Integer>();
85+
set.addAll(Arrays.asList(new Integer[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}));
86+
example.createCriteria().andIn("id", set)
87+
.andNotIn("id", Arrays.asList(new Object[]{11}));
88+
List<Country> countries = mapper.selectByExample(example);
89+
//查询总数
90+
Assert.assertEquals(10, countries.size());
91+
} finally {
92+
sqlSession.close();
93+
}
94+
}
95+
96+
@Test
97+
public void testSelectByExampleInNotIn2() {
8298
SqlSession sqlSession = MybatisHelper.getSqlSession();
8399
try {
84100
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);

wiki/Changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
#更新日志
22

3+
##3.3.8 - 2016-03-23
4+
5+
* `Example``andIn``andNotIn`方法参数改为`Collection` #109
6+
* 解决ResultMapping.Builder3.2.6版本新增`lazy`方法导致无法兼容3.2.4~3.2.5版本的问题,仍然兼容3.2.4+
7+
* 解决github[#12](https://github.com/abel533/Mapper/issues/12) 问题
8+
* 解决#107
9+
* 解决和分页插件PageHelper中orderBy默认属性名相同导致排序的错误
10+
311
##3.3.7 - 2016-03-12
412

513
* `Example`增加`orderBy`方法,使用属性进行排序,例如:`example.orderBy("id").desc().orderBy("countryname").orderBy("countrycode").asc();`

0 commit comments

Comments
 (0)