[BUG] VS 2012 - EF Designer - Association RRS feed

  • Question

  • Hi.

    I am using the latest version of VS 2012 (Update 2) and found a little bug, and i hope this is the right place for me to tell you about.

    This bug is about displaying the association in the property window inside a EDMX (Entity Framework) file incorrectly.

    Lets assume you have an Entity called Account with a IdAccount and an IdParent (plus some other fields that arent important for this bug).

    The IdParent is a self reference to IdAccount and there for i am getting 2 Navigation Properties.

    First is named AccountChilds being the HashSet and holding the childs.

    Second is named AccountParent being a account holding the parnent.

    Now lets assume you click on the AccountChilds Navigation property inside the EDMX designer and have the property window shown. You will get the following Information (I just gona list the relative things for this bug)

    Multiplicity = * (Many)

    Name = AccountChilds

    For the second Navigation Property you will have the following:

    Muliplicity = 0..1 (Zero or One)

    Name = AccountParent

    So far soo good everything looks good and seems to be correct, HashSet = * (Many) single Account Object is of 0..1 (Zero of One).

    Now where is the bug, you may ask. (We are coming there now :))

    When you click on the association itself (the line in the designer - or in Model Browser under the "folder" associations) and let the properties get displayed you will have the following Information:

    End1 Multiplicity: 0..1 (Zero or One of TabAccount)

    End1 Navigation Property: AccountChilds

    End2 Multiplicity: * (Collection of TabAccount)

    End2 Navigation Property: AccountParent

    You may notice now that 0..1 is now related to AccountChilds and * is to AccountParent, which is incorrect as i stated above.

    So the Navigation Property is swapped with there corresponding Muliplicity, in the properties or the association.

    Hope to see a fix for this soon.

    Thursday, May 2, 2013 8:37 AM

All replies

  • Actually, the best place to report Visual Studio bugs is directly to the Visual Studio development team, here:


    Thanks for helping!

    Thursday, May 2, 2013 12:42 PM
  • @ Jack Zhai:

    Thx for the move, there are just toooo many forums related to microsoft products.

    Kinda hard to find the right place when posting for the first time.

    @ pvdg42:

    Thx for the link.

    Friday, May 3, 2013 9:24 AM
  • Hi Rand.Random,

    I think that might be a little confusing if you are using a self-referenced entity type.

    In fact, "Multiplicity" of Navigation property and "End1 Multiplicity" of the association are not the same.

    "End1 Multiplicity" stands for multiplicity of the entity type and "End1 Navigation Property" is the navigation property in the entity type.

    However "Multiplicity" stands for the entity type referenced by this navigation property.

    If you create a relationship with two tables, you can probably find the difference.

    Best regards,

    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Chester Hong Monday, May 13, 2013 8:33 PM
    • Unmarked as answer by Rand.Random Friday, May 17, 2013 8:22 AM
    Wednesday, May 8, 2013 10:27 AM
  • Sry was only checking the connect site, so i missed your answer...

    I unmarked your answer because this doesnt make sense even looking at 2 tabels.

    When i look at the navigation properties and I see the following:

    End1 Muliplicity: 1 (One of TabAccount)

    End1 Navigation Property: TabAccounts

    It just makes no sense to me, why isnt the End1 Multiplicty of Many just like the Navigation Property is.

    Could you pls try to explain it to me more detailed.

    I am trying to make a list of all my Associations and there for i am looking at the Model Browser -> Associations and there is an list of all of them and i want to type them to excel and its totally confusing to see 1 (One of TabAccount) and than the Many Navigation Property... makes no sense at all to me...

    Friday, May 17, 2013 8:51 AM
  • Hi Rand,

    Sorry for late response.

    But I think that is not the same between navigation properties and associations.

    Entity1's navigation property is a type of Entity2 or a collection of Entity2. So Multiplicity of the navigation property in Entity1 means the multiplicity of target association's end. If it is many, it means that Entity1 has a collection of Entity2.

    Associations directly point out the relationship between two entities. If Entity1 and Entity2 have a one-to-many relationship, the multiplicity of Entity1 and Entity2 should be one and many respectively.

    Best regards,

    Chester Hong
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, May 27, 2013 8:04 PM