Author Topic: v15.2β - Redefining EAUML::FK  (Read 10044 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8596
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
v15.2β - Redefining EAUML::FK
« on: June 15, 2020, 04:43:01 pm »
In our MDG, we have a redefinition of EAUML::FK thus:

Code: [Select]
<Stereotype name="DmnsnRfrnc" metatype="Dimension Reference" notes="" cx="200" cy="100" bgcolor="15658671" fontcolor="10061943" bordercolor="10061943" borderwidth="-1" hideicon="0" generalizes="EAUML::FK" baseStereotypes=""EAUML::FKArc" redefines="EAUML::FK">(Arc is our own stereotype)
We create an Association using the Database Modelling profile between two EAUML::table items.  We can then convert the Association to a DmnsnRfrnc stereotype and can even create the Foreign Keys, but we are left with an arc with stereotypes: "FK, DmnsnRfrnc" rather than just DmnsnRfrnc.  Is this because there's a LOT of hard coding in the DB modelling profile?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #1 on: June 15, 2020, 07:35:23 pm »
I just think that all that table stuff is hard coded in EA's stomach. I once had issues with that but found  way without using it. Good luck.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #2 on: June 16, 2020, 11:06:20 am »
Likely EA considers FK to be a keyword.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8596
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #3 on: June 16, 2020, 11:41:55 am »
Likely EA considers FK to be a keyword.
Hi Eve,

I don't mean in rendering, I mean in the Stereotype property in the Properties window (and, I presume, t_xref).

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8596
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #4 on: June 18, 2020, 09:09:23 am »
Likely EA considers FK to be a keyword.
Hi Eve,

I don't mean in rendering, I mean in the Stereotype property in the Properties window (and, I presume, t_xref).

Paolo
[BUMP]

Why are we seeing this?
We need to understand what's going on as it affects our strategy for modelling going forward.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #5 on: June 18, 2020, 10:04:07 am »
This is a hand coded profile isn't it. Tsk Tsk. I think you're causing your own problems.

Code: [Select]
<Stereotype name="DmnsnRfrnc" metatype="Dimension Reference" notes="" cx="200" cy="100" bgcolor="15658671" fontcolor="10061943" bordercolor="10061943" borderwidth="-1" hideicon="0" generalizes="EAUML::FK" baseStereotypes=""EAUML::FKArc" redefines="EAUML::FK">
The inheritance here is wrong.

generalizes always has one stereotype, which you have, but baseStereotypes needs to have both. I also see that you have incorrectly specified that FKArc comes from EAUML.

Code: [Select]
<Stereotype name="FK" notes="" generalizes="Arc" baseStereotypes="Arc EAUML::FK" redefines="EAUML::FK"/>
It wouldn't surprise me if you're confusing EA by not including the generalizes stereotype in the baseStereotypes and the result is that it ends up applying EAUML::FK explicitly in addition to your stereotype. That's not a guarantee though.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8596
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #6 on: June 18, 2020, 12:13:31 pm »
This is a hand coded profile isn't it. Tsk Tsk. I think you're causing your own problems.

Code: [Select]
<Stereotype name="DmnsnRfrnc" metatype="Dimension Reference" notes="" cx="200" cy="100" bgcolor="15658671" fontcolor="10061943" bordercolor="10061943" borderwidth="-1" hideicon="0" generalizes="EAUML::FK" baseStereotypes=""EAUML::FKArc" redefines="EAUML::FK">
The inheritance here is wrong.

generalizes always has one stereotype, which you have, but baseStereotypes needs to have both. I also see that you have incorrectly specified that FKArc comes from EAUML.

Code: [Select]
<Stereotype name="FK" notes="" generalizes="Arc" baseStereotypes="Arc EAUML::FK" redefines="EAUML::FK"/>
It wouldn't surprise me if you're confusing EA by not including the generalizes stereotype in the baseStereotypes and the result is that it ends up applying EAUML::FK explicitly in addition to your stereotype. That's not a guarantee though.
Yes it was handcrafted, but FKArc was a typo in the [Code/] here not in the MDG itself.

I'll make the necessary changes to agree with your points and get back on this.

Paolo

[Edit:  So I set it up as you said.  The multiple stereotypes disappeared, BUT I didn't get what I was actually after...  The ability to add FK Constraints using the context menu (or even the dialog).

So I removed the Arc base stereotype so only EAUML::FK was involved but still no joy.  Is this another case of hard coding (implementation decision)?]
« Last Edit: June 18, 2020, 03:00:22 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #7 on: June 19, 2020, 07:37:44 am »
I did say that all of the datamodeling stereotype checks are explicit.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8596
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #8 on: June 25, 2020, 07:10:11 pm »
I did say that all of the data modelling stereotype checks are explicit.
Does this also apply to table column stereotypes?  Thus to "enhance' the «column» stereotype, I'll need to create a supplemental stereotype?

Paolo

PS: I'm asking analogously to the PM's "Is it Done Done or just Done?"  i.e. "Is it ALL all, or just all (we did)"
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8596
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #9 on: June 26, 2020, 04:39:56 pm »
Further to my point in the previous post,  assuming I create a supplemental stereotype, the only thing I can (effectively) do with that is to add properties (tags) using that stereotype.

If I want to be able to surface those properties via a shape script, I'm "snookered" aren't I?  The supplemental shape script won't be invoked will it?
(I could try it but I don't have the bandwidth RIGHT NOW.  I also suspect I know the answer so I don't want to expend any extra energy with limited bandwidth)

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #10 on: June 29, 2020, 11:05:25 am »
Yes, all db modeling stereotypes including column.

I don't think any of the element or connector stereotypes actually define a shape script though, so EA should still find your shape script.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8596
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #11 on: June 29, 2020, 01:59:29 pm »
Yes, all db modeling stereotypes including column.

I don't think any of the element or connector stereotypes actually define a shape script though, so EA should still find your shape script.
To quote from that iconic US comedy show...  "Laugh-in"  "Verrrry Intereshtink!"

So you're saying that EA will execute the first shapescript it comes across?  Only the first or keep going until there are no more (which would be pretty cool and very useful!)?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8063
  • Karma: +118/-20
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #12 on: June 29, 2020, 04:04:25 pm »
So you're saying that EA will execute the first shapescript it comes across?  Only the first or keep going until there are no more (which would be pretty cool and very useful!)?
It will only execute one. Most shape scripts will draw a filled shape of some sort, so executing both is a lot less useful than you might think.

The one script selected will be the first one, but it prioritizes stereotypes that specify a metatype.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8596
  • Karma: +256/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: v15.2β - Redefining EAUML::FK
« Reply #13 on: June 29, 2020, 04:49:26 pm »
So you're saying that EA will execute the first shapescript it comes across?  Only the first or keep going until there are no more (which would be pretty cool and very useful!)?
It will only execute one. Most shape scripts will draw a filled shape of some sort, so executing both is a lot less useful than you might think.

The one script selected will be the first one, but it prioritizes stereotypes that specify a metatype.
Thanks, again, Eve,

ALL good to know!  It will help with planning how our modelling technology should best evolve.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!