Update Database from model Crashes

6 posts, 0 answers
  1. Gerardo
    Gerardo avatar
    3 posts
    Member since:
    Aug 2013

    Posted 04 Apr 2014 Link to this post

    I'm using Postgres as backend 

    Sometimes after making many changes in the model 
    and I want to update the database, the wizard does not work, but I press next and does nothing,
    I have tried to create a new model but it seems the damage comes from the database and DataAccess just is not able to update the database data. 

    I have reached the point of having to create a new database and migrate all data, when I do this then returns to normal operation. 

    I think this problem is serious and although I like'm seriously considering stop using it for this problem. 

    Version is Q1.2014.1 225

    Help ....
  2. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 09 Apr 2014 Link to this post

    Hello Gerardo,

    I understand your frustration.

    Currently, we are not aware of any issues with the Update Database from Model wizard and Postgres. There are, however, limitations related to the scripts generated by the wizard, that are relevant for all the backends supported by Telerik Data Access. In this documentation article, you can find the details.

    In case, the scenario on your side does not correspond to any of the situations described in the article, it would be highly appreciated if you could share the following information:
    1. Do you experience any errors?
    2. If so, what are their text messages?
    3. What are the changes you perform?
    4. What is the order of the performed changes that leads to the observed behavior?

    Any additional information you find relevant will be very helpful.

    Thank you in advance for your cooperation. I am looking forward to solving the issue with you.


    Regards,
    Doroteya
    Telerik
     
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
     
  3. DevCraft banner
  4. Gerardo
    Gerardo avatar
    3 posts
    Member since:
    Aug 2013

    Posted 10 Apr 2014 in reply to Doroteya Link to this post

    Ok, I send a link video

    https://www.adrive.com/public/W39hRP/DataAccessError.zip

    password: telerik

    excuse my English


    Thanks
  5. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 15 Apr 2014 Link to this post

    Hello Gerardo,

    Thank you for your cooperation and for the video.

    We reviewed the video several times and it appears that it demonstrates two separate issues:
    - The first one would be the suggestion of the Update Database from Model wizard (Select Changes Page) to modify the Delete rule of the constraint and the inability to proceed further to its next page.
    - The second one would be the absence of a constraint when a new association is created between persistent classes that are present in the model.

    Regarding the first one, until the time present we were unable to reproduce it on our side, although it seems like a bug. We would like to continue to investigate and to isolate both the cause for the issue and a feasible workaround. In this quest, we would highly appreciate it if you could provide us with the model that exhibits this behavior.

    Regarding the second issue, the behavior you observe is the expected one. In general, in a round-trip scenario Telerik Data Access does not create constraints for the newly added associations between existing persistent entities. The workflow for resolving the situation includes adding the constraint manually through Constraint Editor. The exact steps are available in this knowledge base article.

    I hope this helps. Thank you in advance for your understanding. We are looking forward to your feedback.



    Regards,
    Doroteya
    Telerik
     
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
     
  6. Gerardo
    Gerardo avatar
    3 posts
    Member since:
    Aug 2013

    Posted 16 Apr 2014 in reply to Doroteya Link to this post

    Thanks, 

    I send a model link

    https://www.adrive.com/public/xyTQ8V/Indra.Dal.zip

    password: telerik





  7. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 21 Apr 2014 Link to this post

    Hello Gerardo,

    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:
    1. Reproduction
    2. Cause
    3. Resolution
    4. Recommendation

    Reproduction
    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 and IdMunicipio properties from the Localidad persistent entity.
    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.

    Cause
    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.

    Resolution
    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 option.
    3. I applied the changes through the Fix Selected button.
    4. Once the dialogue is closed, I saved the domain model.

    At this point, I was able to successfully update the database. 

    Recommendation
    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.



    Regards,
    Doroteya
    Telerik
     
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
     
Back to Top
DevCraft banner