Update from Database is Blank

6 posts, 0 answers
  1. Mark
    Mark avatar
    20 posts
    Member since:
    Feb 2008

    Posted 09 Apr 2013 Link to this post

    Anyone run into this? I want to add some new tables to my Model. I am using Visual Studio 2012. I view the rlinq file, right click, update from database. I select the scheme, my database name does not appear, but my tables do. I select the table I want and click next. Then on the next page 'Select Changes' is blank and the Next and Finish buttons are grayed out.

    I did it once before to add a couple of tables without issue, but now I'm having this problem.
  2. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 11 Apr 2013 Link to this post

    Hi Mark,

    Generally, the Update from Database wizard will behave like in your description in two cases:
    1) There are no changes in the database tables and columns
    2) A table is deleted from the database but is present in the model - the point here is that OpenAccess allows you to enhance your conceptual model (the diagram you see in Visual Designer) and then to migrate the changes to the database. In other words, if you have domain entities which are not present in the database the Update from Database wizard will not suggest you to delete them from the model.

    If the case you are implementing is not one of those, could you please share a little bit more details about it.

    I am looking forward to your feedback.

     

    All the best,
    Doroteya
    the Telerik team
    Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
  3. DevCraft banner
  4. Mark
    Mark avatar
    20 posts
    Member since:
    Feb 2008

    Posted 11 Apr 2013 Link to this post

    I was trying to use one of the ASP.NET Membership API tables (aspnet_UsersInRoles) Since it doesn't have a primary key is that the issues?
  5. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 15 Apr 2013 Link to this post

    Hi Mark,

    I went through the SecurityTutorials database in its default state and it seems that this is the designed behaviour of Telerik OpenAccess ORM in such cases.

    Generally, the apsnet_UsersInRoles table would be included in an OpenAccess domain model as a join table. That means that it is used to model the many-to-many association between aspnet_Users and aspnet_Roles and although it is present in the domain model, it will not be visible on the diagram in Visual Designer.

    In other words, if that table is included in the model but is not modified on the server and you run the Update from Database wizard, select it and then navigate to the Select Changes page, it will be blank.

    In that connection, could you please check whether the table is presented in the model by expanding the Tables node in Model Schema Explorer?

    If the table is not included in the model and you are still experiencing this behaviour, could you please send us a copy of your model so that we can investigate the issue.

    Thank you in advance for your cooperation. I am looking forward to your feedback.


    All the best,
    Doroteya
    the Telerik team
    Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
  6. Mark
    Mark avatar
    20 posts
    Member since:
    Feb 2008

    Posted 15 Apr 2013 Link to this post

    aspnet_UsersInRoles is present in the Model Schema Explorer 
  7. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 16 Apr 2013 Link to this post

    Hello Mark,

    Thank you for the feedback.

    Since the table is present in the model and if it is not modified in the database, the designed behaviour of the Update from Database wizard would be to display an empty Select Changes page for that table.

    If you would like to have a persistent class generated for that table, I would suggest you to set its IsJoinTable property to False in Model Schema Explorer.

    I hope that helps. If you have other questions, do not hesitate to get back to us.


    Greetings,
    Doroteya
    the Telerik team
    Using Encrypted Connection Strings with Telerik OpenAccess ORM. Read our latest blog article >>
Back to Top
DevCraft banner