Designer Removing Custom relations upon model refresh

Posts   
 
    
JRR avatar
JRR
User
Posts: 125
Joined: 07-Dec-2005
# Posted on: 30-Mar-2011 21:08:18   

I have custom relations declared in the llblgen designer, but I don't want to propagate those constraints into the database.

I don't think this happened in 2.6, but now when I refresh the model from the database, the designer removes any relation that does not have an underlying db constraint.

Can this be disabled? I would like to preserve my relationships while doing a model refresh.

Version is 3.1 Final - February 28th, 2011

JRR avatar
JRR
User
Posts: 125
Joined: 07-Dec-2005
# Posted on: 30-Mar-2011 22:11:49   

Maybe we could have a checkbox option to de-select model changes...

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 30-Mar-2011 23:20:42   

I think you'll have to give a better example. model only relationships (introduced in 3.1) are preserved across refreshes. You mean model-only relationships? If so, could you give us a repro case?

Frans Bouma | Lead developer LLBLGen Pro
JRR avatar
JRR
User
Posts: 125
Joined: 07-Dec-2005
# Posted on: 30-Mar-2011 23:26:21   

What is a model-only relationship, and how does it differ from a standard relationship?

My DB does not have any relationships - I can't change it to enforce integrity. In LLBLGen, I want to declare navigation properties.

If I understand correctly, by specifying a relationship in the designer as Model Only, a db model refresh will not clear them out, correct?

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 31-Mar-2011 09:19:46   

Correct, you would build the relations in the model, since they are not enforced in the database and won't be there. So you will end up with navigators, prefetchPaths, relation objects...etc.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 31-Mar-2011 09:39:21   

Indeed. To add: this is a 3.1 feature, you have to check the checkbox for 'model only' on the dialog when creating the relationship, or specify 'mo' after the relationship in quickmodel.

Frans Bouma | Lead developer LLBLGen Pro