How can we help you today? How can we help you today?
slowder
Here's an example where the data generator struggles. CREATE TABLE [dbo].[Story] ( StoryID INT IDENTITY(1,1) NOT NULL , FamilyID INT NOT NULL , Name NVARCHAR(255) NOT NULL , [Description] NVARCHAR(MAX) NULL --redacted columns , [LocationID] INT NULL , [PersonCategoryID] INT NOT NULL , [Published] BIT NOT NULL DEFAULT(1) , CONSTRAINT PK_Story__StoryID_FamilyID PRIMARY KEY (StoryID, FamilyID) , CONSTRAINT FK_Story_Family__FamilyID FOREIGN KEY (FamilyID) REFERENCES Family(FamilyID) , CONSTRAINT FK_Story_Location__LocationID_FamilyID FOREIGN KEY(LocationID, FamilyID) REFERENCES Location(LocationID, FamilyID) , CONSTRAINT FK_Story_PersonCategory__PersonCategoryID_FamilyID FOREIGN KEY (PersonCategoryID, FamilyID) REFERENCES Person.PersonCategory(PersonCategoryID, FamilyID) ) The problem is around the foreign keys on the FamilyID, LocationID and PersonCategoryID. Values in the LocationID field have to be for the same family (tenant). Values in the PersonCategoryID also have to be in the same tenant. So the data generator would have to understand, if I put 1 in the FamiylID, then I have to choose LocationIDs and PersonCategoryIDs that also have familyID of 1. I haven't found a way to do that with data generator. Also, I've found if you have a self-referencing key (say "parentStoryID" and that points back to the PK in this table, StoryID + FamilyID, that fails too. Any ideas on how to configure for these situations? / comments
Here's an example where the data generator struggles.CREATE TABLE [dbo].[Story] ( StoryID INT IDENTITY(1,1) NOT NULL , FamilyID INT NOT NULL , Name NVARCHAR(25...
0 votes