Thank you for your patience and cooperation.
With the help of the domain model I managed to reproduce an issue similar to the one demonstrated in the first part of the video. I was also able to isolate the cause for it, and to define a workflow that allows the persistence of the model changes to the database. Kindly find below the following details:
To reproduce the issue, I used Telerik Data Access version Q1 2014 (2014.1.225) and the next process:
1. In the domain model, I deleted the IdEstado
properties from the Localidad
2. I run the Update Database from Model
wizard and on the Select Changes
page, I selected Migrate Database
3. Once I click on the Next
button an error appeared.
In the case on my side, the cause for the error was that, as part of the foreign key of the Localidad
entity, the deleted IdMunicipio
property had the idx_Localidad_IdMunicipio
index associated with it, and the information about this index remained in the model's metadata after the property was deleted. I was able to find this through the following validation error
in Visual Studio's Error List
The column 'IdMunicipio' is included in the index 'idx_Localidad_IdMunicipio' but is not part of the 'Localidad' table where the index is defined.
Note that this error is part of the Telerik Data Access Validation Framework
, which is designed to provide you with information about potential problems with the mapping of the domain model, as well as to offer you resolutions for them.
In the particular case, I was able to continue with the update of the database schema by resolving the validation error. I used the following steps:
1. Double - click on the error in Error List
2. In the Validation
dialogue, I selected the AUTOMATIC: Delete the index from the meta model
3. I applied the changes through the Fix Selected
4. Once the dialogue is closed, I saved the domain model.
At this point, I was able to successfully update the database.
In the recently released Q1 2014 SP1 version of Telerik Data Access, the error messaging of the Update Database from Model
wizard was enhanced to provide information about the reasons for errors in scenarios similar to the one on your side. Upgrading to it, might be helpful for you, in order to pinpoint exactly the cause for the error on your side (in case Error List contains more then one validation error). You could obtain it through your Telerik account.
I hope this helps. In case the issue persists after resolving the appropreate validation error on your side or you need further assistence, do not hesitate to get back to us.
OpenAccess ORM is now Telerik Data Access
. For more information on the new names, please, check out the Telerik Product Map