No announcement yet.

One to One Relationship

  • Filter
  • Time
  • Show
Clear All
new posts

  • One to One Relationship

    To better understand, which is my problem, I attached an image to explain.

    I have three entities: Object, History and History Stations

    I want to create a history of an object, which gets some data from the entity objects (where all objects are stored) and from another entity, called history stations, where every record represents a different date range an local, where the object has been from date 1 until date 2, then from date 2 to date 3 and so on.
    The history stations may consist of two, three or more records and the links are displayed in the entity history.
    The relationship between history and history stations is a n:n.

    Every history should exist only once, thus the relationship between objects and history is one-to-one

    This all works, as desired but has one problem. If I choose from history one object, that had been choosen before already, the first history with the same object will be destroyed and all history stations of that history become orphans.
    How can I avoid, that you cannot choose an object again, which already has a history created?‚Äč

  • #2
    I myself now get confused.

    Meanwhile I succeded in most of the mentioned problems but still not solved the issue of possible duplicate links, which in a one-to-one relationship cause problems, that the former record will be damaged, when one chooses the same parent again.

    Duplicate check did not work so far also.
    Last edited by shalmaxb; 06-08-2023, 01:33 PM. Reason: Had to delete the text I wrote here earlier.