Author Topic: Is it possible to disable alphabetic sorting?? - blows up my autogenerated code  (Read 4590 times)

Thomas Arnbjerg

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
    • View Profile
I have a a class with the attributes 'left', 'right', 'middle' as seen in the project explorer.

When I iterate over the attributes in Java script the order is 'left', 'middle', 'right'.

Is there a way to avoid this?? - It basically blows up my ability to autogenerate serialization/deserialization code for classes.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12978
  • Karma: +540/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Yes, if you Ctrl+Arrow UP on an attribute in the Features window, you'll get a popup message asking if you want to disable alphabetic sorting.

Geert

Farkas

  • EA Novice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile
Hi,

Another way: Start | Appearance | Preferences  -> Object -> untick 'Sort Features by Stereotype' (in the right column)
I hope this will effect javascript iteration as well, not just the appearance on the screen.

Farkas

Thomas Arnbjerg

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
    • View Profile
Thanks for the suggestions.

The order of attributes in Java Script seems to be always alphabetical - i.e. does not necessarily match the presentation order in EA.

Farkas

  • EA Novice
  • *
  • Posts: 14
  • Karma: +1/-0
    • View Profile

Thomas Arnbjerg

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
    • View Profile
I think this issue is also related to the master-replica implementation. We work in replicas, which are synchronized with the master. The retrieval order follows the insertion order in the database so if synchronization order adds new elements to the master in a different order than the insertion order in the replica the retrieval order is different in the master. This is propagated to any new replicas.
« Last Edit: December 11, 2023, 08:44:09 pm by Thomas Arnbjerg »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12978
  • Karma: +540/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
I think this issue is also related to the master-replica implementation. We work in replicas, which are synchronized with the master. The retrieval order follows the insertion order in the database so if synchronization order adds new elements to the master in a different order than the insertion order in the replica the retrieval order is different in the master. This is propagated to any new replicas.
Don't do master-replica.

Use any other method, but don't user master-replica.

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8548
  • Karma: +253/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
I think this issue is also related to the master-replica implementation. We work in replicas, which are synchronized with the master. The retrieval order follows the insertion order in the database so if synchronization order adds new elements to the master in a different order than the insertion order in the replica the retrieval order is different in the master. This is propagated to any new replicas.
Don't do master-replica.

Use any other method, but don't use master-replica.

Geert
Wot' 'e sed!

Think of Geert as Yul Bynner in that famous ad he made just before he died...  "Whatever you do, don' smok!"

Paolo
« Last Edit: December 11, 2023, 09:53:13 pm by Paolo F Cantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!