ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Severin Ecker <sec...@gmx.at>
Subject cursor or multiple parameters
Date Fri, 13 Jul 2007 07:09:28 GMT
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


Mime
View raw message