Author Topic: Find and delete orphanded items  (Read 12340 times)

karlwg

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Find and delete orphanded items
« on: March 05, 2011, 01:26:21 am »
Hi,

I noticed, that elements can stay within the Project Browser even if they were deleted from all diagrams.
Is there a way to find (and then delete) such orphaned requirements?

Kind regards
Karl


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Find and delete orphanded items
« Reply #1 on: March 05, 2011, 03:30:46 am »
Ctrl-F
Find Orphans
select all
Ctrl-Del

q.

karlwg

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Find and delete orphanded items
« Reply #2 on: March 07, 2011, 08:04:59 pm »
Thank you very much, this is, what I was looking for!

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Find and delete orphanded items
« Reply #3 on: March 08, 2011, 12:34:46 am »
And just for info, a simple deletion on a diagram,  i.e. pressing the delete key when an element is selected will never delete the element from the model/project browser.    You have to use control-delete to achieve that.

hfrmobile

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Find and delete orphanded items
« Reply #4 on: November 16, 2016, 11:37:36 pm »
Was predefined search "Find Orphans" removed in EA13?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Find and delete orphanded items
« Reply #5 on: November 16, 2016, 11:39:51 pm »
I guess you need to search for it. Didn't you know the Easter bunny has its main residence on planet Sparx?

Honestly, I don't know the answer  :-\

Diagram Searches/the first on the list

q.

hfrmobile

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Find and delete orphanded items
« Reply #6 on: November 16, 2016, 11:57:46 pm »
Diagram Searches/the first on the list

Thanks a lot!

Looks like documentation is not up-2-date  ;)

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: Find and delete orphanded items
« Reply #7 on: November 17, 2016, 12:41:40 pm »
And just for info, a simple deletion on a diagram,  i.e. pressing the delete key when an element is selected will never delete the element from the model/project browser.    You have to use control-delete to achieve that.
Umm, that is not actually true.
There are things, that when deleted on a diagram, disappear into the great bit bucket in the sky, please be very careful giving advice like this.
For example if you delete an attribute from a class it is gone (but not a column from a table, or an attribute from a model document)
Orthogonality rules
Using EA16.1 (1627) on Windows 11 Enterprise/64 bit. Repositories in SQLServer2019 DB Schema 1558.
WebEA on Pro Cloud Server 4.2.64

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Find and delete orphanded items
« Reply #8 on: November 17, 2016, 02:26:23 pm »
It is also not a good idea to delete everything on the Find Orphans report without knowing exactly why it is an orphan. As several of you have pointed out many times, diagrams are just a human-support mechanism to help you visualize an aspect of your model, and you could - if you felt so inclined - develop part or all of your model without using diagrams at all.

@hfrmobile - what documentation are you referring to? As far as I can see, the release 13 Help is up to date; where did you find the not-updated material?
Best Regards, Roy

Graham_Moir

  • EA User
  • **
  • Posts: 749
  • Karma: +10/-15
    • View Profile
Re: Find and delete orphanded items
« Reply #9 on: November 17, 2016, 09:40:41 pm »
Isn't an orphan an element that has zero relationships rather than an element that isn't on a diagram?

Also, Skiwi, point taken,  my comment was slightly ambiguous, but the main thrust of what I said related to elements and that still holds true I believe...   "pressing the delete key when an element is selected will never delete the element from the model/project browser.    You have to use control-delete to achieve that."


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Find and delete orphanded items
« Reply #10 on: November 17, 2016, 11:35:33 pm »
For those who want to see the "real ophans", I wrote an SQL query a while ago that return the elements that are really not used anywhere.
See Searching for REAL orphans in Enterprise Architect

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Find and delete orphanded items
« Reply #11 on: November 18, 2016, 06:09:49 am »
Graham, I think it depends. An orphan is someone/something without relations. I guess one can argue that an element not showing on a diagram is also "unrelated". However, there should be lists for both orphan types (maybe Geert's script does address this).

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Find and delete orphanded items
« Reply #12 on: November 18, 2016, 10:51:47 am »
Graham, I think it depends. An orphan is someone/something without relations. I guess one can argue that an element not showing on a diagram is also "unrelated". However, there should be lists for both orphan types (maybe Geert's script does address this).

q.
Don't agree.  It the wrong use of the word "orphan".  The existence of an item on a diagram and or the browser is a matter of choice, even if inadvertent.  That's not to say there shouldn't be a means of finding them -as they represent anomalies within the model.

In addition, I believe EA treats items which have no package (for example, the package has been deleted, but the package reference remains) as "orphans".  I don't think that's correct, they are just logical inconsistencies - which are rectified by the Project Integrity Checker.

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