Book a Demo

Author Topic: Stereotype like table  (Read 4462 times)

Fabio Riera

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Stereotype like table
« on: March 03, 2015, 01:10:27 am »
Hi there,

How do I create a new stereotype like "table"? When I open its properties, I need to set the database and the attributes need to accept sql data types. Can someone help me?
« Last Edit: March 03, 2015, 01:11:39 am by fabioriera »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype like table
« Reply #1 on: March 03, 2015, 03:34:39 am »
IIRC <<table>> gets eaten by some internal EA mechanism prior to reaching user definitions. You could use <<Table>> (upper case T).

q.

Fabio Riera

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Stereotype like table
« Reply #2 on: March 03, 2015, 07:43:13 am »
Using "Table" (with T) I can crate a new stereotype derived from table. Thanks a lot! However, EA keep ignoring the tagged values. This is my profile:

<UMLProfile profiletype="uml2">
      <Documentation id="18F711C8-9" name="ProfileTest2" version="1.0" notes="fooooo"/>
      <Content>
            <Stereotypes>
                  <Stereotype name="MyStereo" notes="" cx="141" cy="77" bgcolor="-1" fontcolor="-1" bordercolor="-1" borderwidth="-1" hideicon="0" generalizes="Table" baseStereotypes="Table">
                        <AppliesTo>
                              <Apply type="Table"/>
                        </AppliesTo>
                        <TaggedValues>
                              <Tag name="tag1" type="char" description="" unit="" values="" default=""/>
                              <Tag name="tag2" type="char" description="" unit="" values="" default="initial test"/>
                        </TaggedValues>
                  </Stereotype>
            </Stereotypes>
            <TaggedValueTypes/>
      </Content>
</UMLProfile>

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype like table
« Reply #3 on: March 03, 2015, 09:35:32 am »
Argh. I have seen that somewhere else (can't recall where) but EA translates the stereotype to lower case (you see that when you create it from the profile). So your only exit is to name it <<myOwnSpecialTableThatEAcantRecognize>> (or <<xTable>> or what ever).

Sparxians , this is really, really nasty.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Stereotype like table
« Reply #4 on: March 03, 2015, 05:24:17 pm »
Quote
Sparxians , this is really, really nasty.
It may be more restricted than the rest of EA's stereotype handling, but if we start being more restrictive about how tables are handled (and there are a few other stereotypes in the same situation) we would break thousands of user models that rely on the current behavior.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype like table
« Reply #5 on: March 03, 2015, 10:16:20 pm »
I think it's ok to catch the table stereotype. But kidnapping others with different case writing seems really nasty and unnecessary. Or is there any rule that stereotypes are case insensitive?

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Stereotype like table
« Reply #6 on: March 04, 2015, 08:57:26 am »
Quote
I think it's ok to catch the table stereotype. But kidnapping others with different case writing seems really nasty and unnecessary. Or is there any rule that stereotypes are case insensitive?
I believe there is somewhere, but I don't have a reference to hand.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Stereotype like table
« Reply #7 on: March 04, 2015, 09:25:06 am »
Superstructures 2.1.1 does not contain the word sensitive except for "context sensitive".  "lowercase" is used only in context of naming conventions. So OMG is silent on that.

I have tried to enter mixed case stereotypes in the Settings/UML and it croaks if a stereotype with same letters and different case already exists.

When trying to enter a stereo in a property field it automatically changes it to an existing one with different case.

So all in all: EA implements stereotypes to be case insensitive. That's how it is. Maybe Roy could cross check the docu.

q.