Book a Demo

Author Topic: Collections and XML schema  (Read 2118 times)

vmadhipatla

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Collections and XML schema
« on: January 08, 2007, 08:23:48 am »
hi,

i have a class with a Collection attribute. members in this collection are of a particular class type (eg. class1).

How do i do this in "Enterprise Architect" so that it generates both java code and xml schema correctly?

currently i have to specify a 1 - * association with class1 and give the target role as the name of Collection attribute.

java code is fine with this. but it still generate duplicate elements in xml schema.

any help will be greatly appreciated.


thanks
venkat

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Collections and XML schema
« Reply #1 on: January 08, 2007, 01:32:28 pm »
Since you have multiple intended targets the recommended approach is to use MDA transforms to generate at least one of the models.  This allows you to customize the model fed into the Java generator and XSD generator.