You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>If any whitespace found inside <code>@Select</code> text, it is interpreted as inline script, not template name. It is convenient to avoid creating templates when script is really small. If you have a large SQL script, you can place it in distinct template and write next code:</p>
132
134
<source><![CDATA[
@@ -143,8 +145,8 @@ where firstName = <@p name="n"/>]]></source>
143
145
This markup further will be passed into MyBatis engine, and it will replace this to <code>?</code>-parameter.
144
146
You can't write <code>#{paramName}</code> directly, because FreeMarker supports this syntax natively
145
147
(alghough it is deprecated). So, to get <code>?</code>-parameters to prepared statements works, you need
146
-
to use <code>${r"#{paramName}"}</code> verbose syntax, or this directive. By the way, in XML
147
-
files <code>${r"#{paramName}"}</code> is more preferrable because you don't need wrap it using
148
+
to use <code>${D}{r"#{paramName}"}</code> verbose syntax, or this directive. By the way, in XML
149
+
files <code>${D}{r"#{paramName}"}</code> is more preferrable because you don't need wrap it using
148
150
<code>CDATA</code> statements. In annotations and in external templates <code><@p/></code>
149
151
directive is more neat.</p>
150
152
</section>
@@ -153,20 +155,20 @@ where firstName = <@p name="n"/>]]></source>
153
155
<p>As in annotations, you can write inline scripts or template names.</p>
154
156
<source><![CDATA[
155
157
<!-- This is handled by FreeMarker too, because it is included into select nodes AS IS -->
0 commit comments