Thanks Larry. I think your suggestion will work, but I was hoping
there was an ibatis way of handling this - or that I could use the
database specific rownum or something similar.

Would it make a big difference if the table had a composite key, such
that no 2 rows have exactly the same column values?

Thanks again,
Anoop

On 8/23/09, Larry Meadors <larry.mead...@gmail.com> wrote:
> You can do it a few ways, I think I'd put the old values and new
> values in a bean, then put those beans in a map and call them "old"
> and "new".
>
> Pass that map to the update and change it to this:
>
>   <update id="updateUserApprover">
>     update user_approvers set region_name = #new.region:VARCHAR#,
>                       division_name = #new.division:VARCHAR#,
>     where user = #old.user:VARCHAR#
>     and region = #old.region:VARCHAR#
>     and division=#old.division:VARCHAR#
>   </update>
>
> Larry
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
> For additional commands, e-mail: user-java-h...@ibatis.apache.org
>
>


-- 

Thanks,
Anoop

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to