Book a Demo

Author Topic: Replace author accross the model?  (Read 4949 times)

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Replace author accross the model?
« on: May 25, 2011, 07:27:49 pm »
Hi,

I've worked on a notebook for a few days, realizing too late the author wasn't configured correctly.

Now I need to change the author of a few dozen elements to fix that error of mine.

How would I do that?

I have a search that shows me all the items I need to change. However, for some items (e.g.) notes, I don't even see a possibility to change the author in the properties window. Also, it would be much more convenient to perform a mass-replace in the model. How do I do that?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Replace author accross the model?
« Reply #1 on: May 25, 2011, 08:26:16 pm »
update t_object set author="you";

q.

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Replace author accross the model?
« Reply #2 on: May 25, 2011, 08:43:14 pm »
Hi,

I'm pretty new to EA. It does look like a script or command, but in which context to use it?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Replace author accross the model?
« Reply #3 on: May 25, 2011, 09:03:16 pm »
EA stores the model in a database.
Either ms-access (.eap file) or any of the other supported databases.
You can execute the update statement on the database directly using your preferred sql client.
Otherwise you could also create a script or add-in and use Repository.Execute("your sql statement") to execute an sql statement on your model.

Geert

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Replace author accross the model?
« Reply #4 on: May 25, 2011, 09:09:18 pm »
Ok, thanks, now it's clear.
I had hoped for something in the UI to help me do it.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Replace author accross the model?
« Reply #5 on: May 25, 2011, 09:44:28 pm »
Come to think of it, there is a GUI way of doing this.
If you show your package as element list (package browser option) then you can edit the author of each element right there on the list.

Geert

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Replace author accross the model?
« Reply #6 on: May 25, 2011, 09:51:51 pm »
Thanks! For small amounts of items, that works just fine!

I can't change all the items (only those that appear in the model tree), but that's good enough for now.