Skip to content

Commit fd15446

Browse files
committed
Doc update
1 parent 80181c8 commit fd15446

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/site/xdoc/sqlmap-xml.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,8 @@ ps.setInt(1,id);]]></source>
485485
<subsection name="sql">
486486
<p>
487487
This element can be used to define a reusable fragment of SQL code that can be
488-
included in other statements. It can be statically (during load phase) parametrized and also included many time
489-
with different property values. For example:
488+
included in other statements. It can be statically (during load phase) parametrized. Different property values can
489+
vary in include instances. For example:
490490
</p>
491491

492492
<source><![CDATA[<sql id="userColumns"> ${alias}.id,${alias}.username,${alias}.password </sql>]]></source>
@@ -496,13 +496,15 @@ ps.setInt(1,id);]]></source>
496496
</p>
497497

498498
<source><![CDATA[<select id="selectUsers" resultType="map">
499-
select <include refid="userColumns"><property name="alias" value="t"/></include>
500-
from some_table t
501-
where id = #{id}
499+
select
500+
<include refid="userColumns"><property name="alias" value="t1"/></include>,
501+
<include refid="userColumns"><property name="alias" value="t2"/></include>
502+
from some_table t1
503+
cross join some_table t2
502504
</select>]]></source>
503505

504506
<p>
505-
Property value can be also used in include attributes (e.g. refid), for example:
507+
Property value can be also used in include refid attribute or property values inside include clause, for example:
506508
</p>
507509

508510
<source><![CDATA[<sql id="sometable">

0 commit comments

Comments
 (0)