Retrieving a list of strings is seen as listmodel that can't be saved back

Bug #1483614 reported by Didier Roche on 2015-08-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
u1db-qt (Ubuntu)

Bug Description

If you push a document that contains property being a list of strings, like:

  'attachements': ["/path/to/foo1.png", "/path/to/foo2.png"]

Retrieving it is making the attachements a ListModel through the QML type system (outside of u1db's scope thus). The ListModel contains ObjectModel and it's useful to attach that to Repeater/Grid.

However, when we try to store those data back (from the same object), the ListModel/ObjectModel aren't storable in u1db, so we end up with:
  'attachments: [null, null]

So getting the object don't enable to save it back, we have to manually typecast it and create some json objects from it, which is quite ugly and cumbersome:

Any idea if u1db-qt can typecast it back to something that can be stored, or anything to make the developer's life easier?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers