Re: Throw an exception in mapper if no row is updated
Under what situations does your application have a (mapped) primary key
id which does not exist in the database. Are you perhaps hitting a case
where the data is not different and no update is done?
On 01/15/2013 09:59 AM, Clinton Begin wrote:
> No, you'd have to do that yourself. You might be able to do it by
> writing an Executor or StatementHandler plugin.
> http://www.mybatis.org/core/configuration.html#plugins >
> On Tue, Jan 15, 2013 at 9:03 AM, jdevelop <[hidden email] > <mailto:[hidden email]>> wrote:
> For mapper interface, if it's method should update a row in the
> database by primary key, I would like to receive an exception if no
> row was updated - so key is missing in the database.
> I know that I can verify number of updated rows, however I want to get
> Is there anything to use in MyBatis for this?