Updating database from model causes errors with fields not even in model

2 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    1 posts
    Member since:
    Sep 2011

    Posted 15 Sep 2011 Link to this post

    Here's what I did:

    1. I created a single model from a database with a lot of other tables (but I only checked this model off). There are no FK constraints.
    2. I added a new property to the model called "VersionID" - an integer, marked it as an identity column.
    3. Right-clicked in the design window and went to Update Database from Model
    4. Chose Migrate Database
    5. Checked off my model (listed as an Add operation for the VersionID column)
    6. Clicked Next
    7. Got an error. Screenshot attached.

    I looked through some of the generated files and didn't see any references to the NodeType class. This is a table that exists in the database, but it doesn't have any relationship to the table or domain model object I'm working with.
  2. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 16 Sep 2011 Link to this post

    Hello Jonathan,

    Unfortunately this is an odd behavior we are not able to reproduce. My assumption is that there is something wrong with your Domain Model mapping, but to come up with a solution I will need your RLINQ file for analysis.

    Could you please send the RLINQ file group - the .cs file for the model and the .rlinq.diagram file? If you could add the database schema creation script in order for us to recreate your database, it would be great.

    I am looking forward to your feedback.


    Regards,
    Ivailo
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's SQL Server Community Awards. We are competing in TWO categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
Back to Top