Book a Demo

Author Topic: Code import - c# and collections  (Read 3103 times)

ronnie

  • EA User
  • **
  • Posts: 81
  • Karma: +0/-0
    • View Profile
Code import - c# and collections
« on: November 30, 2006, 06:33:35 am »
By setting the collection classes I can make a simple 1 to many relationship between Company and Employee to use a collection class called EmployeeList - that is great.

But

When importing fresh source in to a model - the exact same code misses the link between the collection and the '1-many link'. An 'Association' is created from 'Company' to 'EmployeeList' - but the whole concept of the 'Aggregation' is missed!

Is there any way to make EA realise that I have a collection in these cases?

Ronnie
« Last Edit: November 30, 2006, 06:38:21 am by ronnie »
Ronnie

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Code import - c# and collections
« Reply #1 on: November 30, 2006, 01:14:41 pm »
No, EA only creates simple associations the the actual attribute type when reverse engineering.

michael.venema

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Code import - c# and collections
« Reply #2 on: December 04, 2006, 08:06:51 am »
Perhaps you try using System.Collections.ArrayList as default collection class for 1 ..*-associations - you may set it up in Options -> C# -> Collection classes. Doing this round trip code generation and synchronisation works straight, and, to my opinion, it is a good idea to store the instances of a ..*-referenced class in an attribute of type ArrayList within the instances of the referencing class.

So long,

MV