I have enable Parse local-datastore on my swift application. I want to sync remote data with local but I am facing issues with Pointer Array.
I have a PFSubclass like this :
class ShotModel : PFObject, PFSubclassing {
@NSManaged var status: String?
@NSManaged var pics: [PicModel]?
}
And when I update status
on Parse server, the data is sync with my local datastore but when update the pics
Pointer Array, the local data are not changed.
For example:
- I fetch shots list (Array of Shot) which contain only one shot and its 3 pics.
- I get the good response from the server (an Array with one shot and its 3 pics)
- I update this shot on Parse server with 4 pics
- I re-fetch shots list which is supposed to contain one shot and its 4 pics.
- The response is now wrong: the shot has only 3 pics
The result of query is :
[<Shot: 0x170382d80, objectId: VwA1Qc9NBN, localId: (null)> {
pics = (
"<Pic: 0x14ee64460, objectId: h5TGCb8BAx, localId: (null)> {\n \n}",
"<Pic: 0x14ee645d0, objectId: fZ61mvMUAM, localId: (null)> {\n \n}",
"<Pic: 0x14ee634f0, objectId: g8Wbxyk8E3, localId: (null)> {\n \n}"
);
status = Done;
}]
I get the same result wether I delete one, two or all pics.
When i make a remote fetch, the response query always return old Pointer Array list, I don't know why.
Do you know why parse behaves like that, or am i doing something wrong?
V1.7.5 — JUNE 24, 2015 fixes this bug https://parse.com/docs/downloads