mybatis for
- 作者: 西平屠夫
- 来源: 51数据库
- 2020-10-03
官方给的test是可以的
http://code.google.com/p/mybatis/source/browse/trunk/src/test/java/org/apache/ibatis/submitted/nested/?r=3467
Junit Test
NestedForEachTest.java
NestedForEach.xml
index相当于一个变量,类似 for循环里的自增值
一般mybatis里的foreach都是数组或者集合之类的,而且他们都是和数组一样有下标的。
mybatis里的foreach你就把他当成是java里的for循环index就是一个类似数组下标的变量一样
http://code.google.com/p/mybatis/source/browse/trunk/src/test/java/org/apache/ibatis/submitted/nested/?r=3467
Junit Test
NestedForEachTest.java
NestedForEach.xml
index相当于一个变量,类似 for循环里的自增值
一般mybatis里的foreach都是数组或者集合之类的,而且他们都是和数组一样有下标的。
mybatis里的foreach你就把他当成是java里的for循环index就是一个类似数组下标的变量一样
推荐阅读