-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync export skips over well defined Transformable Attributes #591
Comments
Oh, sorry about this. I merged a PR recently trying to fix some warnings. I see what the problem was. I’m not at home at the moment but will rollback as soon as I can. |
Thank you |
Reverted! |
@richard-hood-motorola-solutions could you double-check if it works now? |
I think I reacted too quickly and you are actually referring to a different issue.
I assume your GPS will be a list of doubles but I don't understand how come Latitude and longitude can be arrays? If you want to store multiple points into one entity doesn't it make more sense to store an array of dictionaries then you can have a latitude and longitude per entry? The other option is to make a GPSEntity that stores latitude and longitude then you can have a one-to-many relationship between IARLocation and GPSEntity but I don't recommend this. It's better to keep your structure as flat as possible. Feel free to write me directly https://twitter.com/3lvis |
Attached is a project that illustrates that Sync is not exporting Transformable attributes. gpsDict is defined as a Dictionary [String:Double] in the data model custom class field All of which can be accessed in the app as defined but none of which get exported, as is shown in the debug console when you hit the export button. Sync export just seems to skip over those attributes defined as Transformable. (You may have to hit the export button twice. There seems to be some delay in the DB being updated.) All of these Transformable types should be exportable, shouldn't they? Richard Hood |
Trying to define array in core data that will import / export with Sync. Defined attribute arrays as per core data documentation. The transformable attributes work fine in my app. They are just failing to import / export. Does Sync handle Transformable data.
Method #1) Loading data into core data . . .
Method #1) Export output for Location entity . . .
"location": {
"gps_latitude" = 1;
"gps_longitude" = "1.3";
"location_image" = {
"image_filename" = "5BBD3652-0D52-41AD-A744-78CB9CBF9D83";
"image_path" = "";
"image_type" = png;
name = locationImage;
"text_description" = "Location Image";
"unique_id" = "5BBD3652-0D52-41AD-A744-78CB9CBF9D83";
};
Method #1) Core Data def
attached location core data def.png
Method #2) Loading data into core data . . .
Method #2) Export output for Location entity . . .
Method #2) Core Data def
attached address core data def.png
I currently have gpsLatatude and gpsLongitude defined as Doubles in my code data entity attributes just for verification purposes. I would much prefer to use transformable arrays.
The text was updated successfully, but these errors were encountered: