Book a Demo

Author Topic: Confusion on Synchronise with C#  (Read 2236 times)

cydergoth

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Confusion on Synchronise with C#
« on: October 08, 2005, 07:25:09 am »
Hi

I'm a bit confused using 'Synchronise' with C# code. I've created a UML diagram with associations which have defined target roles, and as expected this generates a C# file for the source class with the corresponding fields defined correctly.

If however I reverse engineer this file with the 'Synchronise' option it adds these associations as attributes to the source class. Surely it should identify an field with the same name as an association target role and update the association instead of adding a new attribute which duplicates the association?

I'm using Build 772 under Windows XP Pro SP2, Visual Studio 8.0.50215.44 and .NET framework 2.0.50215.

Joel

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Confusion on Synchronise with C#
« Reply #1 on: October 10, 2005, 05:29:53 pm »
That behaviour is expected, current builds of EA will always create the attribute, even if an association already exists that represents it.

We have had requests for the behaviour that you are wanting, but don't currently have a schedule for when such a feature could be released.

cydergoth

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Confusion on Synchronise with C#
« Reply #2 on: October 11, 2005, 03:41:46 am »
Hi Simon

Thanks for your quick reply.

Can you clarify which I should regard as the 'master' then? I assume from your comments that it is the attribute which is takes priority on any future code generation and that e.g. documentation on the target role should be copied into the attribute? What happens if the properties (e.g. target class) of the attribute and association differ - will I get a warning?

If I update e.g. the visibility of the attribute will that also update the target role on the corresponding association?

I must admit I find this slightly confusing and would prefer a single representation of these relationships.

Thanks

Joel