如何将属性传播到嵌套的 sql 片段中?

问题描述

我有一个 sql 看起来像这样。

<sql name="level1">
  ${alias}some AS ${prefix}some
</sql>

现在我想在传播这两个属性的同时将上面的片段嵌套到另一个片段中。

<sql name="level2">
  ${alias}other AS ${prefix}other,<include refid="level1">
    <property name="alias" value="${alias}"/> <!-- will this "${alias}" work? -->
    <property name="prefix" value="${prefix}"/>  <!-- will this "${prefix}" work? -->
  </include>
</sql>

抱歉,我应该亲自尝试看看发生了什么。但是我在远程站点工作,测试环境不完整。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)