File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
java/org/apache/ibatis/submitted/includes
resources/org/apache/ibatis/submitted/includes Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2009-2023 the original author or authors.
2
+ * Copyright 2009-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -57,4 +57,10 @@ void testParametrizedIncludes() {
57
57
}
58
58
}
59
59
60
+ @ Test
61
+ void shouldNamespaceBeResolvedAfterIncluded () {
62
+ try (SqlSession sqlSession = sqlSessionFactory .openSession ()) {
63
+ Assertions .assertNotNull (sqlSession .selectList ("org.apache.ibatis.submitted.includes.mapper.selectIds" ));
64
+ }
65
+ }
60
66
}
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<!--
3
3
4
- Copyright 2009-2023 the original author or authors.
4
+ Copyright 2009-2024 the original author or authors.
5
5
6
6
Licensed under the Apache License, Version 2.0 (the "License");
7
7
you may not use this file except in compliance with the License.
30
30
<sql id =" values" >
31
31
VALUES (1);
32
32
</sql >
33
+ <sql id =" selectId" >
34
+ select id from
35
+ <include refid =" tableName" />
36
+ </sql >
33
37
</mapper >
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<!--
3
3
4
- Copyright 2009-2022 the original author or authors.
4
+ Copyright 2009-2024 the original author or authors.
5
5
6
6
Licensed under the Apache License, Version 2.0 (the "License");
7
7
you may not use this file except in compliance with the License.
24
24
<sql id =" sometable" >
25
25
${prefix}Table
26
26
</sql >
27
+ <sql id =" tableName" >
28
+ SomeTable
29
+ </sql >
27
30
28
31
<sql id =" someinclude" >
29
32
<include refid =" ${include_target}" />
54
57
Field3 = #{field3,jdbcType=VARCHAR},
55
58
where field1 = #{field1,jdbcType=INTEGER}
56
59
</update >
60
+
61
+ <select id =" selectIds" resultType =" int" >
62
+ <include refid =" org.apache.ibatis.submitted.includes.fragments.selectId" />
63
+ </select >
57
64
</mapper >
You can’t perform that action at this time.
0 commit comments