File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/test/java/org/apache/ibatis Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 56
56
57
57
<resultMap id =" mutablePostLiteMap" type =" org.apache.ibatis.domain.blog.PostLite" >
58
58
<result property =" blogId" column =" blog_id" />
59
- <association property =" id" column = " id " resultMap =" postLiteIdMap " />
59
+ <association property =" id" resultMap =" mutablePostLiteIdMap " />
60
60
</resultMap >
61
61
62
62
<resultMap id =" mutablePostLiteIdMap" type =" org.apache.ibatis.domain.blog.PostLiteId" >
Original file line number Diff line number Diff line change 15
15
*/
16
16
package org .apache .ibatis .session ;
17
17
18
+ import static org .junit .jupiter .api .Assertions .assertEquals ;
18
19
import static org .junit .jupiter .api .Assertions .assertNotNull ;
19
20
import static org .junit .jupiter .api .Assertions .assertNull ;
20
21
import static org .junit .jupiter .api .Assertions .assertTrue ;
21
22
import static org .junit .jupiter .api .Assertions .fail ;
22
23
23
24
import java .io .Reader ;
25
+ import java .util .List ;
24
26
25
27
import org .apache .ibatis .BaseDataTest ;
26
28
import org .apache .ibatis .domain .blog .Author ;
29
+ import org .apache .ibatis .domain .blog .PostLite ;
27
30
import org .apache .ibatis .domain .blog .mappers .AuthorMapper ;
28
31
import org .apache .ibatis .exceptions .PersistenceException ;
29
32
import org .apache .ibatis .io .Resources ;
@@ -96,4 +99,16 @@ void shouldImplicitlyRollbackInsertedAuthor() {
96
99
assertNull (actual );
97
100
}
98
101
102
+ @ Test
103
+ public void shouldFindAllPostLites () throws Exception {
104
+ List <PostLite > posts = manager .selectList ("org.apache.ibatis.domain.blog.mappers.PostMapper.selectPostLite" );
105
+ assertEquals (2 , posts .size ()); // old gcode issue #392, new #1848
106
+ }
107
+
108
+ @ Test
109
+ public void shouldFindAllMutablePostLites () throws Exception {
110
+ List <PostLite > posts = manager .selectList ("org.apache.ibatis.domain.blog.mappers.PostMapper.selectMutablePostLite" );
111
+ assertEquals (2 , posts .size ()); // old gcode issue #392, new #1848
112
+ }
113
+
99
114
}
You can’t perform that action at this time.
0 commit comments