请高手指点迷经:实在是找不到了,增加  删除  查询语句都好用  但就是修改sql语句不好用,修改完点提交后数据库没改变  就是sql语句出问题了   请高手帮帮忙吧
<statement id="updateGuolv" resultClass="int" parameterClass="guolv">
        update fj_guolv t
        <dynamic prepend="set">
         <isNotNull prepend="," property="id">
        id = #id#
      </isNotNull>       <isNotEmpty prepend="," property="oldword">
        oldword = #oldword#
      </isNotEmpty>
     <isNotEmpty prepend="," property="newword">
        newword = #newword#
      </isNotEmpty>
    </dynamic>
      where id = #id#
</statement>

<statement id="updateGuolvHtmlUrl" resultClass="int" parameterClass="guolv">
        <![CDATA[update fj_guolv t set t.id=1 where t.id = 1]]>
</statement>

解决方案 »

  1.   

    不懂了。你的SQL语句本来就没有更新值嘛。
      

  2.   

    ibatis?
    在程序debug中把具体的sql语句打出来么
      

  3.   

    update fj_guolv t set t.id=1 where t.id = 1
    从数据库看不出改变的效果,SQL文应该被正确执行了。
      

  4.   

    先试个简单的,关键在于参数类中既要携带id新值又要携带老值<statement id="updateGuolv" resultClass="int" parameterClass="guolv">
      update fj_guolv t set t.id=#newId# where t.id=#oldId#
    </statement>