locked
EF6 error 3013 - missing table mapping / problem mapping fragments (0 to 0 or 1) RRS feed

  • Question

  • User379720387 posted

    Table Owners PK ownerId

    &

    Table QbOwners FK ownerId  with a unique index on ownerId

    Think I have a 1 to 0 or 1 relationship which SSMS shows as many to many.

    Updating the model from db gives me an error message


    Error Error 3013: Problem in mapping fragments starting at line 5997:Missing table mapping: Foreign key constraint 'FK_QbOwners_Owners' from table QbOwners (ownerId) to table Owners (OwnerId): no mapping specified for the table QbOwners.  C:\Users\wavemaster\Source\Repos\VT\WebSite1\App_Code\Model.edmx 5998

    I cannot find QbOwners in the diagram or in the model browser.

    How do I fix this?

    ANSWER: 

    Wipe out the entire EF model and start from scratch. Hours wasted.

    EF does a poor job dealing with changes, when are you going to fix this MS?

    Monday, September 3, 2018 11:39 AM

All replies

  • User1724605321 posted

    Hi wavemaster ,

    Do you have solved your issue ? If yes , please share your solution to this error which may help others who meet same problem .

    Best Regards,

    Nan Yu

    Tuesday, September 4, 2018 2:07 AM
  • User379720387 posted

    The solution is to wipe out the entire EF model and start from scratch. Hours were wasted.

    EF does a poor job dealing with changes, when are you going to fix this MS?

    Tuesday, September 4, 2018 2:11 AM