Couchbase Lite parsing nested value as UInt64 then throwing exception on update.
See original GitHub issueLibrary Version
2.0.3
.NET Runtime
Xamarin iOS .NET Standard 2.0
Operating System / Device Details
iOS Simulator iOS 11.4
Log Output
Expected behavior
Either value should have been parse by couchbase lite as a uint rather than UInt64 or couchbase lite should accept UInt64 as a valid upload type (maybe cast under the hood?).
Actual behavior
Couchbase lite parses non floating type values as UInt64 which then are rejected when an update is requested. (See method mutableDoc.SetValue(key, value);
).
Steps To Reproduce
- Create a dictionary where one of the values is another dictionary that has at least one whole number as a value. This can be passed in as a double but when it is uploaded to couchbase server it will have no decimal points in the json.
- Get the document you’ve created using the couchbase id and get the dictionary from it using
document.ToDictionary();
- Dont change the number value in the nested dictionary but still use the mutableDocument
SetValue
method to update the nested dictionary value. You will see the crash.
Reproduction Project
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Couchbase Lite Xamarin: Is there a limit of nested AND ...
Hello, I see this (caught) exception in logs since I started implementing a complex query that has 14 nested “AND” conditions as it's ......
Read more >Updating nested array n1ql - couchbase
I had to update an object within a nested array, recently in Couchbase. ... 'FileStaging' END WHERE type = 'runLog' AND documentMetadata.
Read more >sitemap_1.xml
... /t/filtering-data-in-collection-containing-documents-with-3-level-nested-arrays-depending-on-the-values-in-the-first-and-last-nested-array-mongo/160829 ...
Read more >Use Go1.11 module (#5743) · d77176912b - aiforge-1
Migrate to go modules * make vendor * Update mvdan.cc/xurls * make vendor * Update code.gitea.io/git ... TOML parser and encoder for Go...
Read more >Open Source Used In Firepower 7.4.0
This document contains licenses and notices for open source software used in this product.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@djpongh Can I sneak this into 2.1? It’s very small but saves a lot of hassle if it’s there. All that is required is adding a type to the list of acceptable CBL types.
Well I added the type anyway, and added a test to make sure that ulong can be inserted. However, there is no API to directly insert ulong so if it exceeds the signed 64-bit max value the only way to retrieve it will be through the untyped
GetValue