locked
One to one relationship RRS feed

  • Question

  • Hi

    I need one-to-one relationship in one of my asset classes, each user must have only one laptop and a laptop can only be used by one user. I used Reference relationship, Abstract = false, Source = tablet with min cardinality to 0 and max cardinality to 1, target = Active Directory User or Group, min cardinality = 0 and max cardinality equals 1.

    It is not working as expected, two laptops can have the same user.

    I am using scsm 2012 r2 ur9.

    Thanks


    YSobhdel

    Wednesday, October 30, 2019 11:29 AM

All replies

  • Hi YSobhdel

    I am having the same issue but only when creating a new object with the relationship at the same time via a Type Projection. In this case, I get two relationships to the same object.

    However, if I create a relationship between two existing objects the system performs as expected and updates the existing relationship object with the new target or source object.

    Is this the same for you?

    Geoff

    Monday, November 11, 2019 1:15 PM
  • Hi Geoff

    It is the same for me, as I am creating a new laptop instance and assigning it to an existing user. Yet when I try to assign an existing laptop to the same user once more, the framework does not throw any exception and updates the relationship as if it is many to many relation ship.

    Does your program prevent duplicate relationship to the same target object?


    YSobhdel

    Wednesday, November 13, 2019 6:01 AM