Book a Demo

Author Topic: Generating various multiplicities  (Read 2465 times)

telecky

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Generating various multiplicities
« on: December 17, 2006, 08:41:06 pm »
Hi,

I am new to EA and I am trying to use it for generating simple code from a class diagram. I have 2 classes connected with association and no matter of the multiplicity that I set for that association the code generation creates one member reference (in Java) in the target class. For 1:many it should create a collection etc. What am I doing wrong?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Generating various multiplicities
« Reply #1 on: December 18, 2006, 04:10:17 am »
Take a look at the Advanced tab for the owning side of the property in question. You can define the property to be a collection class - and  you can choose the collection type.

When initially setting up attributes you'll have to save the basic attribute information to enable the Advanced tab.
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Generating various multiplicities
« Reply #2 on: December 18, 2006, 01:00:06 pm »
Just as a further to that last post.  Have a look at http://www.sparxsystems.com/EAUserGuide/index.html?settingcollectionclasses.htm

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Generating various multiplicities
« Reply #3 on: December 18, 2006, 01:28:33 pm »
Once again Simon has been kind enough to cover for my failing memory. The Sparx resources page - check the main Sparx web site or the Registered Users section - has some good stuff, particularly to start you off on the right foot.

Would that there was more in the way of these resources, but the ones that are there are helpful.

You can also look through the EA User Group and Wiki sites. The first post in the Automation section of this forum - which always remains at the top - will provide you with the addresses of both sites (for the Wiki look at the bottom of the post).

David
No, you can't have it!