Author Topic: Inherited associations  (Read 25911 times)

JayHollingsworth

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Inherited associations
« on: August 13, 2013, 08:23:29 am »
If a class is a specialization of any other class which has associations, the associations (and roles) are supposed to be inherited by the child.

How can I see these inherited associations in EA?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Inherited associations
« Reply #1 on: August 13, 2013, 08:42:16 am »
You can't. Either you go to the parent and look there (obvious) or you write a (probably tricky) SQL to do that for you.

q.

JayHollingsworth

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Inherited associations
« Reply #2 on: August 14, 2013, 02:29:08 am »
That's pretty shocking to me. This is OOP (and UML) 101.

I'm trying to make instance (object) diagrams and it's pretty much impossible without visibility into the inherited associations.


I guess I better put something in the suggestions forum.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Inherited associations
« Reply #3 on: August 14, 2013, 09:12:25 pm »
Maybe, but relations have ever since been 2nd class citizens in EA. So chances to see an improvement here are quite low. Doesn't mean I want to discourage you to proceed, though.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8061
  • Karma: +118/-20
    • View Profile
Re: Inherited associations
« Reply #4 on: August 15, 2013, 09:14:26 am »
The problem is actually simpler than that.

Yes, the association is inherited. But EA doesn't query for inherited associations when showing a diagram (and the same for relationships between owned elements.) If it did, the problem would then be how to display it that doesn't cause confusion of where it comes from.

In general I would recommend that to make the diagram clearer you should show the parent that actually owns the relationship.

JayHollingsworth

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Inherited associations
« Reply #5 on: August 16, 2013, 01:51:16 am »
Showing a full class inheritance hierarchy may be OK for a class diagram but it makes no sense on an object diagram.

Abstract classes shouldn't appear on an object diagram - since they're not instantiable. All that should be shown are real instantiable elements, and I have no way to see inherited relationships. Inherited properties show up correctly on an object diagram, though.

dge98753

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Inherited associations
« Reply #6 on: December 23, 2023, 08:07:27 am »
I was searching the forum for answers to my questions, and I came across this topic.
Is it still the case in the 16.1 version of EA ?
Is it still not possible to have access to inherited relationships across the composition/aggregation of elements ?
I think I have posted a similar kind of question https://sparxsystems.com/forums/smf/index.php/topic,48189.0.html