Author Topic: Problem with Update method  (Read 10228 times)

cjcrystal

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Problem with Update method
« Reply #15 on: May 17, 2018, 07:41:58 pm »
in relation to Element.Update ,

How exactly does this work?
Updates the Element in the database and the model?

What happens when the Element is locked. Does it force Update?

Thank you.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problem with Update method
« Reply #16 on: May 17, 2018, 08:43:44 pm »
Update save the changed properties of your EA.Element instance in memory to the database.

If the element is read-only because of locking you'll get an exception.

Geert

cjcrystal

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Problem with Update method
« Reply #17 on: May 22, 2018, 02:20:50 pm »
Update save the changed properties of your EA.Element instance in memory to the database.

If the element is read-only because of locking you'll get an exception.

Geert

thank you Geert  , much appreciated

bilon

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: Problem with Update method
« Reply #18 on: May 23, 2018, 10:05:02 pm »
Yes, this way it is described in the documentation: "Should be called after adding a new item or after deleting an item".

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Problem with Update method
« Reply #19 on: May 23, 2018, 10:53:17 pm »
Most times the question is "what does the documentation not say?". So it does not tell that altered elements of the collection still are shown unaltered unless you re-fetch the whole element (and its collections) anew.

q.

bilon

  • EA User
  • **
  • Posts: 85
  • Karma: +0/-0
    • View Profile
Re: Problem with Update method
« Reply #20 on: July 25, 2018, 05:41:37 pm »
I've contacted sparx, they said it's an issue, it should be fixed sometimes :-) in the future.