in

The ORM Foundation

Get the facts!

Re-Use of Entity Types on Same Page

Last post 04-09-2009 2:47 by Andy Reiser. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-07-2009 4:21

    • Andy Reiser
    • Top 50 Contributor
      Male
    • Joined on 01-24-2009
    • Sunshine Coast, Queensland, Australia
    • Posts 14

    Re-Use of Entity Types on Same Page

    My apologies if this is not the correct forum for a NORMA question.

    How do you re-use entity types? That is, I have an entity type "Postcode". I want it to repeat on the same page, to un-clutter my model. So, logically, there will still only be one Postcode entity type. But it will appear more than once on the page.

    Cheers.

  • 04-07-2009 6:26 In reply to

    Re: Re-Use of Entity Types on SameOpen the ORM Model Browser

    Hi Andy,

    To re-use entity types on the same page, proceed as follows:

    1: Open the ORM Model Browser (right click the drawing surface for the menu)
    2: Expand "Object Types" (double click it)
    3: Select the object & drag it to the [page.
    4: Use the ORM Designer toolbox to add facts & other features.

    So, as I have explained, you can do this. However, I find that it's best to de-clutter a diagram by creating a new page.(right click on the page tab at the bottom of the drawing window.). A single object can appear on many pages - but its still the same object in the model.

    Many people ask me "Where is ORM being used?" So it would help other readers if you would update your personal profile to show city,country. Jut click on the "edit profile" button at the top right of your screen and edit the "Location" box under the "About" tab.

    Thanks

    Ken 

  • 04-07-2009 11:51 In reply to

    Re: Re-Use of Entity Types on SameOpen the ORM Model Browser

    You don't actually need the Model Browser to perform this operation, just hold the Control key down when dragging one or more shapes and the shape(s) will be duplicated on the diagram. The advantage of dragging the existing shape from the diagram is that any shape settings will be replicated with the shape, as opposed to dragging the element from the Model Browser, which will give you shape defaults.

    Shape settings include things like shape orientation, refmode expansion for fact type shapes, and relative positioning of child shapes (reading shapes, objectified object name shapes, value constraints, etc).

    You can also drag shapes from one diagram to the other. This can be done using the 'Diagram Spy' tool window or with multiple document windows open on the same document. These features are discussed in 'General Use' and 'Window Management in Visual Studio' sections of the readme file, which is installed in the '%ProgramFiles%\ORM Solutions\ORM Architect for Visual Studio 200x' directory.

    Note that you cannot directly control links between shapes (role player links, note connectors, subtypes). The heuristic used if a link is indicated is as follows:

    1. If there is a relationship between element A and element B and a shape for element A is positioned on a diagram, then find the nearest shape for element B
    2. If the nearest shape for element B is not closer to another shape for A, then create the link shape

    The goal of the design was to eliminate lines across diagrams in most situations, and to never double-indicate a relationship (without step two, you could have one ObjectTypeShape connected to two FactTypeShapes for the same ObjectTypePlaysRole relationship). The one weakness in the system for multiple shapes that are very close is that the 'nearest shape' is based on the center of the shape, not the actual connection points. This means that the final connection line for the chosen shape pairing may in fact be longer than another available line to a different shape. For general use, however, the current algorithm 'just works' in the vast majority of cases.

    -Matt

     

  • 04-09-2009 2:47 In reply to

    • Andy Reiser
    • Top 50 Contributor
      Male
    • Joined on 01-24-2009
    • Sunshine Coast, Queensland, Australia
    • Posts 14

    Re: Re-Use of Entity Types on SameOpen the ORM Model Browser

     Thanks Ken and Matthew. I always appreciate the guidance that I get here.

    Copying an Entity Type across pages looks like it would involve a bit of extra work. So, for now, I think I will stick to the one page.

    I will update my profile as suggested by Ken.

    Cheers

Page 1 of 1 (4 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service