Update query issue

5 views
Skip to first unread message

Prasanga Sampath

unread,
Jun 6, 2025, 6:33:02 AMJun 6
to greenDAO
I'm using GreenDAO in an Android-based app. Under normal conditions, my update query works perfectly — it returns true, and the data is updated as expected.

However, I've encountered a critical issue: if the battery is removed immediately after update query execute, the update query still returns true, but the actual data does not get persisted in the database after the device restarts.

I've confirmed that:

The @Id(autoincrement = true) annotation is used properly.

The DAO method is returning success.

No exceptions are thrown during the update.

Has anyone experienced a similar issue? Is there something additional I need to do to ensure data is flushed to disk immediately
Any help or insight would be greatly appreciated. Thank you!
Reply all
Reply to author
Forward
0 new messages