ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From balas_iyer <balasubramanian.i...@wipro.com>
Subject Selective Update using Abator generated code.
Date Wed, 10 Sep 2008 10:28:43 GMT

Hi All,
How do I achieve a selective update using abator generated code. The case
here goes as follows.
There is a "ANSWER_TEXT" column in "ANSWERS" table which can be selectively
updated by the used (He can also provide null as a possible value), now the
abator generated updateByExample fails in such cases as it checks for not
null for this column as shown

update ANSWERS
    <dynamic prepend="set" >
      <isNotNull prepend="," property="record.answerId" >
        ANSWER_ID= #record.answerId:BIGINT#
      <isNotNull prepend="," property="record.answerText" >
        ANSWER_TEXT = #record.answerText:VARCHAR#

So null values will escape the updates. 

Any suggestion will be appreciated, 
Thanking you in Anticipation
View this message in context: http://www.nabble.com/Selective-Update-using-Abator-generated-code.-tp19410283p19410283.html
Sent from the iBATIS - Dev mailing list archive at Nabble.com.

View raw message