greenDAO icon indicating copy to clipboard operation
greenDAO copied to clipboard

SQLCipher change the query order.

Open moxgeek opened this issue 5 years ago • 1 comments
trafficstars

i know that at the first point it look like the problem isn't related to the protection with a password for the db using getEncryptedWritableDb function, but i did run a several time the process and at each time it do the same thing . so the problem is when i run a select query , i got a specific result ( exactly like i expect it ) but if i change only getWritableDb to getEncryptedWritableDb(ASWEETPASSWORD) , the result of the query change remain the same but with different order . the query :

        String q = "SELECT DISTINCT "+MessageDao.Properties.Sender_id.columnName+", " +
                "count(case "+MessageDao.Properties.Status.columnName+" when 'RECIVED' then 1 else null end ) ," +MessageDao.Properties.ResellerUniqueId.columnName+
                "  FROM "+ MessageDao.TABLENAME +
                "  WHERE "+MessageDao.Properties.Id.columnName+" !=-1 " +
                " GROUP BY "+MessageDao.Properties.Sender_id.columnName+" ,"+MessageDao.Properties.ResellerUniqueId.columnName+
                " ORDER BY "+MessageDao.Properties.Id.columnName +" DESC";

MessageDao.Properties.Id.columnName is not changing btw.

moxgeek avatar Dec 25 '19 09:12 moxgeek

@greenrobot @greenrobot-team , i again test that , and still the same error ...

moxgeek avatar Feb 12 '20 17:02 moxgeek