Re-Order Relational Model Fields

Posts   
 
    
ab-tools
User
Posts: 15
Joined: 18-Dec-2020
# Posted on: 23-Dec-2020 20:05:45   

Hello,

I'm sorry if that's a stupid question and I expect the resolution to be very simply, but I couldn't find it myself despite some searching: I've re-ordered some fields in the designer, but they seem not to get re-ordered in the already existent relational model.

As I do not have the actual database created yet (while still being in the initial design phase) I simply would like to have all relational model entities to use the current/new entity field order.

What's the easiest way to accomplish this?

Best regards and thanks Andreas

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 24-Dec-2020 09:05:57   

That's by design as re-ordering table fields on an existing database isn't possible in most cases without dropping the entire table. If you want this and you haven't created the tables yet, right-click the catalog or schema and select 'Exclude from Project'. The designer will then remove the tables and you can then sync again to recreate the tables.

Frans Bouma | Lead developer LLBLGen Pro
ab-tools
User
Posts: 15
Joined: 18-Dec-2020
# Posted on: 24-Dec-2020 12:50:55   

Thanks, Frans, I did what you said (excluding from project and re-creating it) and this works fine!

But one more question in regards to the field ordering: When I have an inherited table (with "TablePerEntity") obviously the identity field is also inherited from the super-type.

As it has two fields with the order number "0" now it seems to just order them by name again, but you obviously want to have the inherited identity field (in the screenshots below the "Id" field) to stay on top.

How can this be accomplished?

Best regards and thanks again for your great support Andreas

Attachments
Filename File size Added on Approval
InheritedParentId.PNG 2,512 24-Dec-2020 12:51.07 Approved
Walaa avatar
Walaa
Support Team
Posts: 14986
Joined: 21-Aug-2005
# Posted on: 24-Dec-2020 19:22:19   

I can't reproduce this. Which version of the Designer are you using?

The Sub/Child entity doesn't get the inherited fields displayed in the Fields tab. Only it's own (fields get displayed). So there is no ordering to be set.

ab-tools
User
Posts: 15
Joined: 18-Dec-2020
# Posted on: 24-Dec-2020 22:01:13   

Hello Walaa,

first thanks for your quick reply at Christmas much appreciated! :-)

Walaa wrote:

I can't reproduce this. Which version of the Designer are you using?

Version 5.7.2.

Walaa wrote:

The Sub/Child entity doesn't get the inherited fields displayed in the Fields tab. Only it's own (fields get displayed). So there is no ordering to be set.

That's correct, the inherited "Id" field is not displayed in the "Fields" tab, but in the "Field mappings" tab: It's about the mapping in the actual database table. Here the inherited "Id" field is the second field/column instead of the first one as I would expect it to be.

Best regards Andreas

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 25-Dec-2020 09:47:37   

It's currently a limitation of the designer. In general field ordering is something that's not that important (or at all), which is also the reason it's switched off.

Frans Bouma | Lead developer LLBLGen Pro