update foo set bar = #newBar# where foo = #foo# and bar = #bar#
Larry On 7/13/07, Severin Ecker <[EMAIL PROTECTED]> wrote:
hi all, i have a problem (which i think i need to resolve with cursors but maybe you know another way in ibatis) let's say i have a table ( hello VARCHAR, world VARCHAR ) both fields form the primary key together. what i need is, selecting one specific entry (by specifying values for both fields in a query). i then want to update one of the two fields with a new value. now i can lock the entry by starting a transaction and selecting my desired row with a select 'bla' for update. but how do i guarantuee that exactly that row that was returned is altered with the following update statement? can i get some id for the returned row, or tell the sqlmapper to update the one previously returned in the transaction... or can i just use 2 parameters (or a list) in the sqlmap? thanks for help! cheeers, severin
