ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt" <zkoppanyl...@intland.com>
Subject update() accepts <insert>?
Date Sun, 23 Oct 2005 13:48:13 GMT
Hi!

  Today we found a strange problem: our <selectKey> stanza embedded in an
<insert> was simply ignored by iBATIS: the INSERT statement did run, but
after that nothing happened -> the SELECT LAST_INSERT_ID() did not appear in
the log and iBATIS didn't give any error msg, either.

  Finally we found that by accident we used the
sqlMap.update() and not create() to invoke the SQL fragment, which was
actually an <insert>.
  So it was our fault.

  But is this the desired behaviour that .update() accepts also <insert>
fragments without any warning?
IMHO it might be a good idea to throw some kind a exception in this case.

Zsolt




Mime
View raw message