uniqoue contraint and database first

Posts   
 
    
methodman
User
Posts: 194
Joined: 24-Aug-2009
# Posted on: 03-May-2011 14:37:14   

When database first is used, are the unique contraints added automaticly or they must be added manualy ?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 03-May-2011 21:17:25   

UCs needed for 1:1 FK/UC - PK relationships are added when you click 'validate and adjust relational model data'. UCs you add to the entity are added as well automatically. So you can control the UCs from within the model simple_smile

Frans Bouma | Lead developer LLBLGen Pro
methodman
User
Posts: 194
Joined: 24-Aug-2009
# Posted on: 04-May-2011 13:12:36   

I mean this situation. I have a table in the database which has an unique contraint on a column. When I use the "Reverse engineer tables to entity definitions" function of the designer, the unique contraint won't show up in entity definition. Thus I cannot use the ConstructFilterFor function of the entity.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 04-May-2011 14:25:53   

If it's defined on an FK, it won't show up as it's used to make the relationship 1:1. Also make sure you're using the latest build, I do recall there was a bug in an earlier v3 build for this.

Frans Bouma | Lead developer LLBLGen Pro
methodman
User
Posts: 194
Joined: 24-Aug-2009
# Posted on: 05-May-2011 09:53:43   

It was because of the mentioned bug. I've got the new version and it works now fine.