Book a Demo

Author Topic: ordering of table columns  (Read 9022 times)

tprohas

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
ordering of table columns
« on: March 13, 2006, 02:45:20 pm »
I think after I did the upgrade to version 6.1 all my database table columns were re-sorted in alphabetical order. This I don't like and want to be able to order them the way I specify. Is this possible? The other thing that happend after the upgrade is that the columns got group together into two different groups, once called columns and the other called Columns. The difference being the first capital letter. How can I fix this?

Thanks.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: ordering of table columns
« Reply #1 on: March 13, 2006, 04:29:32 pm »
Look at Tools | Options | Objects | Sort Features Alphabetically.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: ordering of table columns
« Reply #2 on: March 13, 2006, 05:04:33 pm »
Also see in "Tools | Options | Objects" : Group Operations by Stereotype and Group Attributes by Stereotype

tprohas

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: ordering of table columns
« Reply #3 on: March 14, 2006, 09:38:34 am »
Thank for the reply. The sorting has been fixed by unchecking the sort option which is great.

I can also mostly fix the grouping by unchecking Group Attributes by Stereotype, but this doesn't really solve the problem, it just hides it. When the Group Attributes is checked it causes all the table attributes to be put in a group called Columns and another group called columns. How can I make this one group?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: ordering of table columns
« Reply #4 on: March 14, 2006, 01:02:17 pm »
You can make it one group by fxing your stereotypes so that they all use the same case.

tprohas

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: ordering of table columns
« Reply #5 on: March 14, 2006, 04:16:57 pm »
Quote
You can make it one group by fxing your stereotypes so that they all use the same case.


I just looked under Settings | UML | Stereotypes and only see the stereo type with the lower case column. I don't see one that starts with an upper case letter. Now what?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: ordering of table columns
« Reply #6 on: March 15, 2006, 03:57:02 am »
A bit of a long shot, but worth looking into...

In the UML Settings / Stereotypes dialog, click on each of the "column" stereotypes. Look at the Group Name field - which does not show up in the list view - and compare the case there.

As I understand it, the Group Name field provides the heading for grouping elements with a given stereotype. If you have two (otherwise) identical stereotypes with different group names, you will likely end up with two groups.
No, you can't have it!

tprohas

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: ordering of table columns
« Reply #7 on: March 15, 2006, 09:45:31 am »
Quote
A bit of a long shot, but worth looking into...

In the UML Settings / Stereotypes dialog, click on each of the "column" stereotypes. Look at the Group Name field - which does not show up in the list view - and compare the case there.

As I understand it, the Group Name field provides the heading for grouping elements with a given stereotype. If you have two (otherwise) identical stereotypes with different group names, you will likely end up with two groups.


This is the problem, there aren't two column stereotypes only one and its the one that's all lower case. So where is the uppper case stereotype coming from?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: ordering of table columns
« Reply #8 on: March 15, 2006, 01:13:35 pm »
My guess is that you have individual columns with the stereotype of 'Column'.  Even though it's not defined as a model level stereotype.  Just edit the stereotype of each column in the wrong group to be lower case.

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: ordering of table columns
« Reply #9 on: November 27, 2006, 01:51:04 pm »
Has this been broken in EA 6.5.799+?

My columns are not sorted in alpha order - regardless of the 3 tools -> options -> objects settings.

Any ideas?

Cheers,
DAvid.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: ordering of table columns
« Reply #10 on: November 27, 2006, 02:23:53 pm »
Quote
Has this been broken in EA 6.5.799+?

My columns are not sorted in alpha order - regardless of the 3 tools -> options -> objects settings.

Any ideas?

Cheers,
David.
No ideas David...  But I can confirm your observed behaviour.

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

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: ordering of table columns
« Reply #11 on: November 27, 2006, 03:03:51 pm »
Thanks Paolo,

I might log as a bug - or try a test on an older version to confirm.

David.
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: ordering of table columns
« Reply #12 on: November 27, 2006, 03:36:27 pm »
Quote
Has this been broken in EA 6.5.799+?

My columns are not sorted in alpha order - regardless of the 3 tools -> options -> objects settings.

Any ideas?

Cheers,
DAvid.

The "Sort Features Alphabetically" option does not affect the order of columns in a table. This is intended behaviour since field order is important in generated DDL.
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: ordering of table columns
« Reply #13 on: November 27, 2006, 04:04:50 pm »
Quote
The "Sort Features Alphabetically" option does not affect the order of columns in a table. This is intended behaviour since field order is important in generated DDL.
Thanks Neil,  I figured as much...

Although it could be argued that it is no more important than for other structural features.

It is one of the fundamental tenets of Relational Theory that the tuples are defined purely in terms of the columns not their placement.

In the generated DDL the order (theoretically) should be irrelelvant.  (If you are worrying about squeezing things into DB blocks then you're worrying about the wrong things...)

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

Dave_Bullet

  • EA User
  • **
  • Posts: 295
  • Karma: +0/-0
    • View Profile
Re: ordering of table columns
« Reply #14 on: November 29, 2006, 03:53:49 pm »
PRoblem is I can't even use the hands buttons in the project browser to reposition the columns (regardless of sort alphabetically settings).

Seems I might have to resort to some SQL skulduggery on the "pos" field in the t_attribute table  ;D
"I know I'm close to a good design, but it's like the balloon animals, squeeze in one spot and the problem moves down the line"