Hi, I’m using couchbase lite 2.0 for Android. Take a look at this, after these 3 lines:
Log.d(TAG, "insert: before " + newTask.getLong(myId));
mDatabase.save(newTask);
Log.d(TAG, “insert: after” + newTask.getLong(myId));
Outputs for example:
insert: before 11989091
insert: after -4788125
insert: before 231548688
insert: after 0
But there are many other long that works. Can you help with this?
jens
October 3, 2017, 4:21pm
2
That’s almost certainly an encoder bug that was fixed on August 23rd. I don’t know which version of CBL Android incorporates the fix, but I would think it’s fixed in the latest build. (@hideki ?) What build are you using?
hideki
October 3, 2017, 4:43pm
3
Hi @itai.shalom2 ,
What DB version of CBL 2.0.0 are you using? Latest build (DB017) is built with the latest litecore module which has this fix.
I added another unit test with the value you are using. Latest code can handle these large long values.
https://github.com/couchbase/couchbase-lite-android/blob/feature/2.0/android/CouchbaseLite/src/androidTest/java/com/couchbase/lite/DictionaryTest.java#L386-L399
Thanks
jens
October 3, 2017, 6:56pm
4
The fix is already in DB16; I just verified this.