ActiveAndroid icon indicating copy to clipboard operation
ActiveAndroid copied to clipboard

Delete with executeSingle function may cause NullPointerException

Open wangzhengyi opened this issue 8 years ago • 1 comments

If user use new Delete().from(StudentDAO.class).where("age = 100").executeSingle()

and the student is not exist, this may cause NullPointerException.

I create this PR for this problem. link:https://github.com/pardom/ActiveAndroid/pull/510

wangzhengyi avatar Dec 02 '16 03:12 wangzhengyi

It is wrong way. executeSingle() - add to the delete statement LIMINT 1 and you will have syntax error

uncledoc avatar Mar 12 '17 13:03 uncledoc