Book a Demo

Author Topic: Constraint Status - repeats  (Read 5019 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Constraint Status - repeats
« on: February 15, 2012, 12:31:29 pm »
I was leafing through Settings | Project Types [ch9658] | General Types… when I chanced upon the Constraint Status tab.

The values shown in there were the 6 expected types - but each one was repeated 5 times!

Anyone else see this (before I report the bug).

TIA,
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: Constraint Status - repeats
« Reply #1 on: February 15, 2012, 08:44:35 pm »
Mine are okay. But instead of reporting a bug simply delete the duplicates. Heaven knows how they got there.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Constraint Status - repeats
« Reply #2 on: February 15, 2012, 11:21:34 pm »
Quote
Mine are okay. But instead of reporting a bug simply delete the duplicates. Heaven knows how they got there.

q.
I thought they weren't duplicated in the DB

But it seems I wasn't pointing at the right DB...  :-[

However, one interesting side effect is that if I delete using the EA UI - although I delete 1 entry, ALL the entries with that value are deleted!

More EAUI!

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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Constraint Status - repeats
« Reply #3 on: February 17, 2012, 06:42:33 pm »
Hmm, I can perfectly imagine how that came about:

Problem: implement delete button
Solution: Delete from <contraint table> where name = '<selectedConstraint.name>' ::)

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Constraint Status - repeats
« Reply #4 on: February 17, 2012, 06:54:16 pm »
Quote
Hmm, I can perfectly imagine how that came about:

Problem: implement delete button
Solution: Delete from <constraint table> where name = '<selected Constraint.name>' ::)

Geert
Wrong use case!  :)

Problem: implement delete button for selected constraint only

Since name is NOT unique, you shouldn't delete on it...

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

stevesavage

  • EA User
  • **
  • Posts: 119
  • Karma: +4/-0
    • View Profile
Re: Constraint Status - repeats
« Reply #5 on: May 23, 2012, 11:28:02 pm »
@Paulo, you might get multiple copies of constraints if someone has merged the "reference data" from multiple repositories in to a single repository.  I had something similar happen recently when I was merging two repositories in to a single repository.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Constraint Status - repeats
« Reply #6 on: May 24, 2012, 11:58:28 am »
Quote
@Paulo, you might get multiple copies of constraints if someone has merged the "reference data" from multiple repositories in to a single repository.  I had something similar happen recently when I was merging two repositories in to a single repository.
Understood...  My point is that since name is not unique you shouldn't delete on it.  You run the risk of deleting ALL the instances, including the ONE you wanted to keep.

In my work in the background - direct to the database - I often generate duplicate things during development and testing so I have a standard technique for removing the extra duplicates and (unfortunately) it needs to rely on an external table to hold the candidates for purging.

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