About Us Litepal frame, save and modify the return value prompt succeeds, but the value of the database does not change

Source: Internet
Author: User

Title, has been in the use of Litepal, really very convenient a framework, the blog is also very detailed, Mr. Guo, get started very quickly, however, today in my project found such a problem, is that I update, returned 1, indicating that I updated a successful data, but, I opened again, found that the data did not change, I tried to save, but also have the same problem, but sometimes it is normal, by looking at the source of the discovery, the database of Aunt Guo has done optimization, directly delete the two conditions, that is, remove the optimization, the results immediately resolved, but there should be a better way, I deleted the optimized part directly when I was too late.

There's a judgment in the DataHandler. 917-919, Erase

if (!isfieldwithdefaultvalue (baseobj, field)) {Putcontentvalues (baseobj, field, values);/}
Of course, can be based on their own not need to optimize the entity class to judge, so that other normal use does not need to delete the optimization of the module can also run normally, here is the litepal of Aunt Guo's tutorial blog http://blog.csdn.net/guolin_blog/article/ details/38461239

About Us Litepal frame, save and modify the return value prompt succeeds, but the value of the database does not change

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.