Remove/Hide Table Relationships

Posts   
 
    
sabrogden
User
Posts: 8
Joined: 06-Dec-2008
# Posted on: 06-Dec-2017 16:17:09   

We have a table that we want to remove the database relationships to other tables in llblgen. We want to better control how the entity is accessed and saved.

We can delete the relationship in the llblgen designer but next time we "refresh relational model data from a database" it brings it back. This post (https://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=1340&HighLight=1) talks about hiding it but i don't see that in any of the menus and the post is quite old.

How can we remove/hide a tables relationship in the llblgen designer so next time we refresh the data model it doesn't come back.

We are using a slightly older version of llblgen.

Version: 4.1 Final SD.LLBLGen.Pro.ORMSupportClasses.dll: 4.1.14.219 SD.LLBLGen.Pro.DQE.SqlServer.dll: 4.1.14.219

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 07-Dec-2017 05:11:18   

Hi sabrogden,

Yes, that post is for old versions. Now you can set a project setting that flags the designer to follow/don't follow db relationships. The setting is this:

Relationships follow db foreign key constraints. When set to true (Default), all normal relationships which are not marked as 'model-only' have to have a foreign key constraint in the new relational model data after refresh, or they'll be removed. When set to true, new relationships are created from newly found foreign key constraints. When set to false, relationships without a foreign key constraint in the new relational model data are left as-is and there aren't any new relationships created from foreign key constraints found in the new relational model data. The value Default means the value in the preferences is used.

David Elizondo | LLBLGen Support Team
sabrogden
User
Posts: 8
Joined: 06-Dec-2008
# Posted on: 07-Dec-2017 17:38:21   

That works but i only want to not generate the relationships for a single table. All other tables i want the relationships. Can this be accomplished?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 08-Dec-2017 09:40:41   

We want to better control how the entity is accessed and saved.

I think you might want to remove the Navigator not the relation.

Example, For the following relation: Customer 1:n Order, you don't want to have Customer.Orders, but the relation can still be available for filtering purposes.

For example you want a Customer of a specific order, or you want Orders of a specific Customer.