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 11/*
2- * Copyright 2009-2023 the original author or authors.
2+ * Copyright 2009-2024 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -57,4 +57,10 @@ void testParametrizedIncludes() {
5757 }
5858 }
5959
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+ }
6066}
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!--
33
4- Copyright 2009-2023 the original author or authors.
4+ Copyright 2009-2024 the original author or authors.
55
66 Licensed under the Apache License, Version 2.0 (the "License");
77 you may not use this file except in compliance with the License.
3030 <sql id =" values" >
3131 VALUES (1);
3232 </sql >
33+ <sql id =" selectId" >
34+ select id from
35+ <include refid =" tableName" />
36+ </sql >
3337</mapper >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!--
33
4- Copyright 2009-2022 the original author or authors.
4+ Copyright 2009-2024 the original author or authors.
55
66 Licensed under the Apache License, Version 2.0 (the "License");
77 you may not use this file except in compliance with the License.
2424 <sql id =" sometable" >
2525 ${prefix}Table
2626 </sql >
27+ <sql id =" tableName" >
28+ SomeTable
29+ </sql >
2730
2831 <sql id =" someinclude" >
2932 <include refid =" ${include_target}" />
5457 Field3 = #{field3,jdbcType=VARCHAR},
5558 where field1 = #{field1,jdbcType=INTEGER}
5659 </update >
60+
61+ <select id =" selectIds" resultType =" int" >
62+ <include refid =" org.apache.ibatis.submitted.includes.fragments.selectId" />
63+ </select >
5764</mapper >
You can’t perform that action at this time.
0 commit comments