Umbraco 8 IUmbracoEntity AdditionalData - umbraco

In Umbraco v7 IUmbracoEntity used to have a property called AdditionalData which doesn't exist anymore in v8. I can't find any documentation on this dictionary or where it's stored in the db or whether it's migrated in v8 or not?
Is there any alternatives? and how to migrate the old AdditionalData dictionary to the new alternative?

According to https://github.com/umbraco/Umbraco-CMS/ the IHaveAdditionalData interface is implemented on Members, MemberGroups and if we go down the rabbit hole IEntitySlim which also happens to implement IUmbracoEntity.
Does that help you? I'm not sure... But maybe if you have a chance to use IEntitySlim where you used to use IUmbracoEntity, you'll have the same properties (ish) as you did in v7?

Related

How to Migrate an entity in Coredata where destination entity's model is just created

I have a model Version. The entity passPhrase of Version needs to be migrated to New entity passPhrase in Home model.
But the Home model is introduced in new version of database. It was not present in old xcdatamodel. How can I migrate data from
Version.passPhrase to Home.passPhrase
And the golden rule of CoreData migration is - avoid custom migration at any cost. :)
So the way to do this to use lightweight migration to add your new entity, and then just use a one off migration script to move your data over.
You can remove the passPhrase property from your Version class definition but you need to leave it in the model for now so you can still access the old data. This can be cleaned up at some time in the future when you are confident all of your users have upgraded to the newer version, or just leave it there forever.
To access the existing value during your copy just use [version valueForKey:#"passPhrase"] and then once copied clear it out the same way [version setValue:nil forKey:#"passPhrase"]
In core data, Changing Entity / Model mapping does not comes under light weight migration. You have to handle it manually by subclassing NSMigrationManager and implementing custom NSEntityMigrationPolicy.
Apple provides little documentation on the subject.Please check the Custom Core data migration with detailed example. Hope this will help.

Application.Current.properties is broken in latest xamarin forms release?

Since I've updated my xamarin installation to xamarin 4, saving local properties is not working across sessions on iOS.
so if I have
Application.Current.Properties.Add("key", value);
Application.Current.SavePropertiesAsync();
It's not saving anything when the app is closed & restarted.
Any pointers?
This was fixed by not saving the complex objects as it is, but serializing them to string using JsonConvert & then storing the string instead.
This works all the time.
When you want to retrieve the object back again, just deserialize the string to the object type.
This seems to be a bug in Xamarin Forms 2, revert back to the latest v1 to get it working again.
See http://forums.xamarin.com/discussion/56461/persisting-data-locally-device-cache#latest
You should NOT use Xamarin Forms 2 yet, it is not production ready yet and should be considered alpha, don't believe Xamarins marketing.

CoreData: How do you migrate an unversioned store?

So I'm working on a project which has been published to users. Before I put my hand on this project, this project has an 1.0 and an 2.0 version, v2.0 modified the data model of core data, but the one who did this didn't add a new version to data model.
So when user upgrade from v1.0 to v2.0, it will crash.
My problem is now I'm deploying v3.0, how do I modify my xcdatamodel so that user with v1.0 and v2.0 can both upgrade to v3.0 without problem?
Get the V1 model and add a new version to it that is identical to v2 and then add another V3 model to that so that you end up with a model that has all three versions. That way you should be able to use lightweight migration from either of the previous versions, assuming that your model changes will in fact support lightweight migration. If not then do a manual migration as suggested by #Mundi. You can recover the V1 model from the V1 app bundle if you no longer have the source code but you do need a copy of the V1 app bundle to do so. You might have to google for how to do this or let me know and I will hunt around as I will have it documented somewhere... Hope this helps.
The only feasible solution that comes to mind seems to be to include two data models in the bundle. (Essentially, the versioning system does something similar.)
Read the data with the first model, then "manually" copy it to the data store of the second model (modifying it as necessary). From then on, only use the second model (which should be versioned for future changes).
I would block the UI and put up a message like "migrating your data" to make sure no user interaction interferes with this process.

Migrate uComponents Related Links datatype data to Umbraco 7

I'm trying to upgrade from Umbraco 6 to 7, and I used the uComponents Related Links data type in Umbraco 6, so I need to change to use the standard Umbraco 7 Related Links data type instead. The data needs to change from XML to JSON. Does anyone know how to go about doing that?
It'd also be great to trigger something automatically when the upgrade happens - but I can only find mention of GUID -> alias mapping in the upgrade documentation.
Thanks! And I'm amazed I can't find anyone else trying to do this!

Breeze, CreateEntity with cloning existing enity

I have a need to clone existing entity and insert it as a new object to the database.
Can somebody please advise a best way accomplish this?
I used detachEntity method of a breeze for the object I wanted to clone. However that left navigation property blank. I did not went through further research and wrote a generic code to manually copy the navigation properties to cloned object.
Cloned object then added to the breeze manager using createEnttiy and that did the job.

Resources