Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: fluxtah on February 02, 2004, 10:47:00 am

Title: how to work with [] type arrays?!
Post by: fluxtah on February 02, 2004, 10:47:00 am
When forward engineering from a model I am able to generate associations with multiplicity by setting the collection classes option of a class to the desired name of the collection ie- 'Book[]'

When synchronising the model I loose the association links because EA does not recognise that Book[] is collection of Book.

Anyone know how to solve this prob?

- Fluxtah
Title: Re: how to work with [] type arrays?!
Post by: Sean Kearon on February 03, 2004, 01:29:23 am
I reported this as a bug in late November last year and got a reply that they were going to fix it.  If I remember right, you get an attribute when you reverse engineer, as opposed to an association.  They usually fix issues swifter than this - maybe it's been overlooked.

Sean
Title: Re: how to work with [] type arrays?!
Post by: fluxtah on February 03, 2004, 03:30:43 am
cool, on forward engineer it seems to do what I want it to do from an association, if i link to classes via an association, set the target role or source role to a some name, then set the data type field to the target type with [] after it the code will forward engineer fine.

I can also acheive this by setting the collection class option under the class properties.

prob is when synchronise/ reverse engineer the fwd engineered attributes with multiplicity are unrecognised, stripping away any associations I had.

I can get round the issue by not synchronising.

Title: Re: how to work with [] type arrays?!
Post by: Sean Kearon on February 03, 2004, 03:33:28 am
Maybe reporting it as a bug again would move it along a bit.  I guess they are flat out getting version 4 ready to ship at the moment.
Title: Re: how to work with [] type arrays?!
Post by: fluxtah on February 03, 2004, 04:04:13 am
cool! that is a good thing :] I think after scanning the boards the question about [] array notation has been asked enough.

I will leave them to dev v4!

- Fluxtah

Title: Re: how to work with [] type arrays?!
Post by: benc on February 10, 2004, 07:23:40 pm
Hi Fluxtah and Sean.

Just to confirm, we are aware of this bug and it will be fixed.

Regards,
Ben
Title: Re: how to work with [] type arrays?!
Post by: fluxtah on February 11, 2004, 03:59:31 pm
Quality :]
Title: Re: how to work with [] type arrays?!
Post by: Eve on April 06, 2004, 04:32:42 pm
Hi everyone

I just want to report that support for this has been fixed so look out for the fix in a build coming soon.

When you import a class with a variable such as
Book[] a;  It should import with no problems, the type will be Book and the collection will be [].  It should then output as well.

Additionally, if this is the return type of a function then it will set the return array checkbox.

Simon