Hello all. CB Lite 2.0 user, for Xamarin Forms .net shared project in C# (just for a frame of reference)
Am I missing anything baked into CB Lite that would automatically convert models to and from their necessary dictionary format? We’ve had to do a goodly amount of work to get this done, and for complex models (models with collections of other models within them) this has been squirrelly to achieve. I would have thought there would have been something generic available within CB Lite to handle this back and forth while saving and querying docs. I totally understand some companies likely wanting to bake their own for customization sake, but, for general use, I’m just a little surprised you cannot just feed CB Lite a List, say which field is the primary key equivalent for the resulting json(no-sql), and then auto generate the needful unto itself back and forth. If you have found anything third party or general public use that you found helpful, would love to review them.
I’m just curious in general, how other users of CB Lite 2.0+ have approached the model to dictionary to/from conversions. We have approached it by baking in ConvertToDictionary and ConvertFromDictionary, ProcessDictionary and similar methods into our models to get things working back and forth ultimately as List<Dictionary<string,object>>. I’m sure there are other more generic ways to create your own back and forth conversion tools (or any other sdks libraries, etc in c# land) that you have found useful when interacting with CB Lite. If you want, share them below. We have been toying with just taking lists of complex objects, json encode , then json decode as JsonConvert.DeserializeObject<List<Dictionary<string, object>>
I’ll play my own devil’s advocate:
“Why are you asking this? Just figure it out and do the needful.”
If you are attempting to attract new couchbase customers, in particular for mobile development, a vast majority of them use SQLite for database interaction. They are not used to having to bake their own model conversions for CRUD operations.
Peter Robbins - CB Lite Fan