pardom-zz / ActiveAndroid

Active record style SQLite persistence for Android
http://www.activeandroid.com
4.7k stars 1.03k forks source link

InnerJoin not working with SqlliteCipher and ActiveAndroid #453

Open yogeshmishrikotkar opened 8 years ago

yogeshmishrikotkar commented 8 years ago

I am working on SqliteCipher along with using the active android library.

When I am trying to use the Inner Join with active android it is working fine and giving me the proper result of data. Below is the my Db Query.

List records = SQLiteUtils.rawQuery(MyDataBo.class, "Select * from MYDATA INNER JOIN FOLDER_MYDATA_REL ON MYDATA.REFERENCE_ID = FOLDER_MYDATA_REL.RECORD_ID AND FOLDER_MYDATA_REL.FOLDER_ID = ? ORDER BY FOLDER_MYDATA_REL.CREATED_AT DESC;", new String[]{folderId+""}); it gives me the list of MyDataBo with all values in like int , long, strings , dates etc.

But When I implemented the SqliteCipher to encrypt my database With ActiveAndroid and trying to use the same query it is not given me same result. Means it still gives the list but all int , long values is 0. Which is actually not zero.

can anyone help...

faultylogic commented 8 years ago

I'm not sure about your implementation but our implementation of SqliteCipher and ActiveAndroid is working with out any problems with joins. Becareful though SqliteCipher does not work with android N and they are currently doing a fairly large refactor with no ETA for a fix.