Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: LNS_Software on March 08, 2004, 06:58:22 pm

Title: Code Generation involving associations
Post by: LNS_Software on March 08, 2004, 06:58:22 pm
I have the following specification:

(http://www.lns-systems.com/download/modelsegment.jpg)


I am generating code for btAudioFile.  Excluding the attributes, I see only one association getting defined:

      public ArrayList patterns;

I would expect to also a definition for track as:

      public btAudioTrack track;

Am I expecting too much from the code generator, or am I making a mistake in the way in which I specify the association?

Any help would be appreciated.  Thanks.
Title: Re: Code Generation involving associations
Post by: jkorman on March 08, 2004, 08:43:10 pm
For the association btAudioFile <----> btAudioTrack

Set the Direction to Bi-Directional

btAudioTrack should be Source : Role = track
btAudioFile should be Target : Role = audioNotes

Set the multiplicity of track to nothing
Set the containment of of track to value

Set the multiplicity of audioNotes to 0..*

Jim