Author Topic: how to work with [] type arrays?!  (Read 5587 times)

fluxtah

  • EA User
  • **
  • Posts: 144
  • Karma: +0/-0
    • View Profile
how to work with [] type arrays?!
« 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
« Last Edit: February 02, 2004, 10:55:39 am by fluxtah »

Sean Kearon

  • EA User
  • **
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: how to work with [] type arrays?!
« Reply #1 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

fluxtah

  • EA User
  • **
  • Posts: 144
  • Karma: +0/-0
    • View Profile
Re: how to work with [] type arrays?!
« Reply #2 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.


Sean Kearon

  • EA User
  • **
  • Posts: 126
  • Karma: +0/-0
    • View Profile
Re: how to work with [] type arrays?!
« Reply #3 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.

fluxtah

  • EA User
  • **
  • Posts: 144
  • Karma: +0/-0
    • View Profile
Re: how to work with [] type arrays?!
« Reply #4 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

« Last Edit: February 03, 2004, 04:04:53 am by fluxtah »

benc

  • EA Administrator
  • EA User
  • *****
  • Posts: 200
  • Karma: +0/-0
    • View Profile
Re: how to work with [] type arrays?!
« Reply #5 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

fluxtah

  • EA User
  • **
  • Posts: 144
  • Karma: +0/-0
    • View Profile
Re: how to work with [] type arrays?!
« Reply #6 on: February 11, 2004, 03:59:31 pm »
Quality :]

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8083
  • Karma: +118/-20
    • View Profile
Re: how to work with [] type arrays?!
« Reply #7 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