Book a Demo

Author Topic: Multiple records in t_xref table for one guid  (Read 4986 times)

sravang

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Multiple records in t_xref table for one guid
« on: March 01, 2021, 09:30:58 pm »
Hello,

I don't exactly know why there are multiple entries for one guid in t_xref table.

I am trying to set stereotypeex and fqstereotype values from Description column in t_xref table.

I am using this query to get vaues - "select * from t_xref tx where tx.Client = '{0006EC54-FB51-4d5b-A141-7C9481571FD1}' AND tx.Name = 'Stereotypes'"

For this one it returns two rows with different Type one is attribute property and other is element property.

What exactly should be considered and what is the difference between them.

Thanks,
Sravan

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Multiple records in t_xref table for one guid
« Reply #1 on: March 01, 2021, 10:02:07 pm »
Then apparently you have assigned two stereotypes to the elemen.

q.

sravang

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: Multiple records in t_xref table for one guid
« Reply #2 on: March 01, 2021, 10:09:17 pm »
Is there anything to do with Type??

One record has type - 'attribute property' and other one has - 'element property'


Thanks,
Sravan

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple records in t_xref table for one guid
« Reply #3 on: March 01, 2021, 10:19:06 pm »
Is there anything to do with Type??

One record has type - 'attribute property' and other one has - 'element property'


Thanks,
Sravan
Have you run a project integrity check?

That may clear up the issue.  Also, check if you have both an element with that GUID and an Attribute with the same GUID.

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: +397/-301
  • I'm no guru at all
    • View Profile
Re: Multiple records in t_xref table for one guid
« Reply #4 on: March 02, 2021, 12:06:34 am »
Is there anything to do with Type??

One record has type - 'attribute property' and other one has - 'element property'


Thanks,
Sravan
You then have an attribute in your element which is also stereotyped. Just use the element property entry for the element itself.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Multiple records in t_xref table for one guid
« Reply #5 on: March 02, 2021, 09:47:33 am »
One record has type - 'attribute property' and other one has - 'element property'

You then have an attribute in your element which is also stereotyped. Just use the element property entry for the element itself.

Not exactly, the 'attribute property' does refer to an attribute, but the Client should match a record in t_attribute.ea_guid. The Project Integrity check will pick that up and change the attribute guid. If there isn't one Project Integrity check should detect the orphaned row and remove it. If both types were the same the Project Integrity check will pick that up as a third type of issue, it would not mean that multiple stereotypes had been added to the element. (Seeing the pattern yet. Run Project Integrity Check)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Multiple records in t_xref table for one guid
« Reply #6 on: March 02, 2021, 10:50:27 am »
I was just writing out of my head (and having the feeling that it was not right). Also having seen Paolo mentioning the "usual suspect". It should be noted though, that the PIC needs to be run with the Repair option turned on and ignoring EA's warning that it's bad to do that :-/ (no, it isn't).

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Multiple records in t_xref table for one guid
« Reply #7 on: March 02, 2021, 11:07:40 am »
One record has type - 'attribute property' and other one has - 'element property'

You then have an attribute in your element which is also stereotyped. Just use the element property entry for the element itself.
Not exactly, the 'attribute property' does refer to an attribute, but the Client should match a record in t_attribute.ea_guid. The Project Integrity check will pick that up and change the attribute guid. If there isn't one Project Integrity check should detect the orphaned row and remove it. If both types were the same the Project Integrity check will pick that up as a third type of issue, it would not mean that multiple stereotypes had been added to the element. (Seeing the pattern yet. Run Project Integrity Check)
Thanks for clarifying, Eve,
I was hoping the PIC would fix that kind of thing, but never having had the problem myself (because I run the PIC early and often - like voting ;)), couldn't vouch for it.

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