Book a Demo

Author Topic: Realationship vs Class Attribute  (Read 2944 times)

schnitt_tt

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Realationship vs Class Attribute
« on: April 21, 2012, 07:46:50 am »
Hello,

(sorry, can`t "upload" an image, sombody knows how ??).



Class A has a Composition Relationship to Class B. If I model this in EA and create Sourcecode of this, everything is fine. Class A has an Attribute with Type Class B.

In EA I don`t see this Class B Type Attribute in the Class A. Is there a way to show assign Realtions to Attributes ??

thx
schnitt_tt

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Realationship vs Class Attribute
« Reply #1 on: April 21, 2012, 05:35:58 pm »
If you wan't to show a picture: store it on a public site (e.g. imageshack) and place the link via the 3rd icon.

q.

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Realationship vs Class Attribute
« Reply #2 on: April 21, 2012, 07:49:02 pm »
Hi,

EA doesn't create class attributes for associations automatically. Source code generation will respect these though.
If you want to see the attribute, you have to create it explicitely and set the corresponding association role.
But take care to choose the appropriate attribute type. In your case this should be some container class or alike.

HTH
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

schnitt_tt

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Realationship vs Class Attribute
« Reply #3 on: April 22, 2012, 02:11:43 am »
@both : thx

a bit cumbersome but it works ... another way would be: transform to sourcecode and re-import the sourcecode .. also a bit cumbersome ... anyway, thx for your help