Skip to content

Commit 80181c8

Browse files
committed
Documentation added for complex parametrized includes
1 parent 260abff commit 80181c8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/site/xdoc/sqlmap-xml.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,28 @@ ps.setInt(1,id);]]></source>
500500
from some_table t
501501
where id = #{id}
502502
</select>]]></source>
503+
504+
<p>
505+
Property value can be also used in include attributes (e.g. refid), for example:
506+
</p>
507+
508+
<source><![CDATA[<sql id="sometable">
509+
${prefix}Table
510+
</sql>
511+
512+
<sql id="someinclude">
513+
from
514+
<include refid="${include_target}"/>
515+
</sql>
516+
517+
<select id="select" resultType="map">
518+
select
519+
field1, field2, field3
520+
<include refid="someinclude">
521+
<property name="prefix" value="Some"/>
522+
<property name="include_target" value="sometable"/>
523+
</include>
524+
</select>]]></source>
503525
</subsection>
504526

505527
<subsection name="Parameters">

0 commit comments

Comments
 (0)