Book a Demo

Author Topic: Attribute and type with the same name  (Read 7038 times)

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Attribute and type with the same name
« on: December 13, 2016, 09:18:59 pm »
In this tutorial I read the following:

Quote
In our case we needed an URL NameSpace tag on our WSPackage. To do so I added a Tagged Value type called “namespace” and in the “Detail:” field we added the text “Type=URL;”. Now we have defined the Tagged Value type and it is ready to be used in our element. To do so add an Attribute with the same name as the Tagged Value, and type the name of the Tagged Value type in the “Type:” field. In our case an Attribute named “namespace” with the Type “namespace”.

So...

If I add an attribute to an element with the name "namespace", and I choose as type also "namespace", I get the following error message:

Quote
Attribute with that name already exists

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Attribute and type with the same name
« Reply #1 on: December 13, 2016, 09:21:54 pm »
Yes, I think that is a bug.
I haven't reported it yet, but someone should.

Geert

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Attribute and type with the same name
« Reply #2 on: December 13, 2016, 09:26:12 pm »
But why does it work in that tutorial? Is it because they used an older version?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Attribute and type with the same name
« Reply #3 on: December 13, 2016, 09:49:56 pm »
Attributes must be named unique. That has ever (and will likely ever) be the case. Check if there's already an attribute with that name.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Attribute and type with the same name
« Reply #4 on: December 14, 2016, 01:35:33 am »
Attributes must be named unique. That has ever (and will likely ever) be the case. Check if there's already an attribute with that name.

q.

Not it's actually if you create an attribute name "A" with type named "A" then you get an error, even if it's the only attribute on that class.
I haven't tested if this has been solved in the latest version.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Attribute and type with the same name
« Reply #5 on: December 14, 2016, 01:43:05 am »
Just did with 1206 and 1309 and they worked.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Attribute and type with the same name
« Reply #6 on: December 14, 2016, 03:09:24 am »
Can't seem to be able to reproduce it on version 12.1.1230 either.
I guess it has been fixed.

Matthias, which version are you using?

Geert

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Attribute and type with the same name
« Reply #7 on: December 14, 2016, 05:00:46 pm »
Can't seem to be able to reproduce it on version 12.1.1230 either.
I guess it has been fixed.

Matthias, which version are you using?

Geert

I'm using 12.0.1215, but I will try it on 12.1.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Attribute and type with the same name
« Reply #8 on: December 14, 2016, 09:59:15 pm »
Can't seem to be able to reproduce it on version 12.1.1230 either.
I guess it has been fixed.

Matthias, which version are you using?

Geert

I'm using 12.0.1215, but I will try it on 12.1.

That makes sense, the client where I had/have the issue is still on 12.0

Geert