ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: Newbie question: Update table that has no key / id
Date Sun, 23 Aug 2009 11:52:58 GMT
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-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message