Please perform for testing the refresh in the designer and export the DDL SQL script to see what is in there: the script will signal what has changed in the relational model data that justified an export.
Below is the content of the DDLSQL file. It's the same content each time a ddl refresh is required:
-- ----------------------------------------------------------------------------------------------------------------
-- Generated by LLBLGen Pro v4.1 Build: November 14th, 2013
-- SQL Server 2000/2005/2008/2008R2/2012/Express DDL Script generated from project: MyProject
-- Project filename: C:\src\MyProject\MyProject.llblgenproj
-- Script generated on: 20-nov-2013 12:40.40
--
-- This is an Update script for updating an existing data model to a newer version. If you want DDL SQL for a new model,
-- please create a Create script instead.
--
-- This script might create schemas, which requires you to assign a proper user to the schema. Adjust the CREATE SCHEMA
-- statements below, if any, to avoid errors at runtime.
--
-- Please run the scripts in the right order, use the timestamp in the filename and inside this script for that.
-- This script might need adjustment in some statements. You should consider this script as a starting point for
-- upgrading the existing data model.
-- ----------------------------------------------------------------------------------------------------------------
-- ###############################################################################################################
-- Drop constraints referring to elements which are changed in this script (constraints are recreated later on)
-- ###############################################################################################################
USE [core]
GO
ALTER TABLE [dbo].[ExternalFolderVisibility] DROP CONSTRAINT [FK_ExternalFolderVisibility_Folders]
GO
-- ###############################################################################################################
-- Rename statements
-- ###############################################################################################################
USE [core]
GO
-- ###############################################################################################################
-- DROP statements for elements no longer needed or replaced elements.
-- ###############################################################################################################
USE [core]
GO
-- ###############################################################################################################
-- ADD statements for new elements (except FK/UC)
-- ###############################################################################################################
USE [core]
GO
-- ###############################################################################################################
-- ALTER statements for table fields and ADD statements for new primary key constraints
-- ###############################################################################################################
USE [core]
GO
-- ###############################################################################################################
-- ADD statements for new foreign key constraints and unique constraints
-- ###############################################################################################################
USE [core]
GO
ALTER TABLE [dbo].[ExternalFolderVisibility]
ADD CONSTRAINT [FK_ExternalFolderVisibility_Folders] FOREIGN KEY
(
[FolderId]
)
REFERENCES [dbo].[Folders]
(
[FolderId]
)
ON DELETE NO ACTION
ON UPDATE NO ACTION
GO
In the project file the following line is changed:
<NormalRelationship Name="ExternalFolderVisibility.Folder-Folder.ExternalFolderVisibilities" Start=":ExternalFolderVisibility" End=":Folder" StartNavigator="Folder" EndNavigator="ExternalFolderVisibilities" Type="4" DeleteRuleAction="1">
The change is DeleteRuleAction="1" being added to the element.
We are several devs using the same project file using GIT, and I can't say whether this is a bug in your code or our usage of it :-)
I think though that the requirement to export the DDL SQL comes BEFORE the refresh not after it, as it performs a full validation & relational model data adjustment based on the project data and it then concludes something in the relational model data has changed so you have to export that first and run on the database BEFORE you refresh.
You're right of course, it didn't re-appear when refreshing multiple times after each other. We just can't figure out why the "ExternalFolderVisibility" table re-occurs in the DDLSQL update scripts, when we (AFAIK) didn't make changes in the project.
Perhaps you can point me in the direction of what could trigger this?