Changes to unique constraint names not picked up

Posts   
 
    
morten71
User
Posts: 80
Joined: 13-Jan-2009
# Posted on: 21-Jul-2021 09:37:48   

Dear support.

Is there a setting to have changes to unique constraint names (and other index names) picked up by the "sync relational model data" refresh process after the initial adding of a table to an entity definition?

Thanks in advance.

/Morten

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 21-Jul-2021 14:20:10   

So you defined a unique constraint on table1, named UC_Table1, and you then changed its name to UC_Field1Field2 or something and you want that new name to be picked up? It does pick up the changed name here. (database first)

It recreates the UC's in the relational model data using the new names. If I misunderstood what you meant, please give an example.

Frans Bouma | Lead developer LLBLGen Pro
morten71
User
Posts: 80
Joined: 13-Jan-2009
# Posted on: 21-Jul-2021 16:20:05   

Otis wrote:

So you defined a unique constraint on table1, named UC_Table1, and you then changed its name to UC_Field1Field2 or something and you want that new name to be picked up? It does pick up the changed name here. (database first)

It recreates the UC's in the relational model data using the new names. If I misunderstood what you meant, please give an example.

Hi Otis.

  1. I have a database first project, and sometimes I forget to change the default name (IX[tablename]) when creating a unique key constraint (I wanted UC[tablename].
  2. I then run LLBLGen and sync the relational model data of now I have a unique constraint name IxTableName.
  3. I change the name to UC_tablename in the database
  4. I do a new model sync but still have the original name IxTableName

See screenshot: https://imgur.com/a/WjvwjwG

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 22-Jul-2021 10:01:46   

Ah, you mean the name of the UC in the entity model! No, those names aren't synced, as they're for illustration purposes only anyway. (the name isn't used in the generated code). they're mainly used to give the UC in the entity a unique name. You can rename them in the entity manually if you want to.

Frans Bouma | Lead developer LLBLGen Pro
morten71
User
Posts: 80
Joined: 13-Jan-2009
# Posted on: 22-Jul-2021 11:09:03   

Otis wrote:

Ah, you mean the name of the UC in the entity model! No, those names aren't synced, as they're for illustration purposes only anyway. (the name isn't used in the generated code). they're mainly used to give the UC in the entity a unique name. You can rename them in the entity manually if you want to.

Alright. And thanks for the info