Reputation: 3237
I know I can use these code to update the table, but it use the primary key id for comparison.
DaoSession daoSession = ((App) getApplication()).getDaoSession();
StudentDao studentDao = daoSession.getStudentDao();
studentDao.update(studentBean); //update by id
But sometimes, I need to use other column to update the table, it maybe like:
UPDATE STUDENT_TABLE SET ADDRESS = 'Texas' WHERE NAME = 'David';
How to implement the above sql statement with greendao?
Upvotes: 0
Views: 46