BUG: Enforce relationship for INSERTs and UPDATEs


Author
Message
Aaron Young
Aaron Young
StrataFrame User (439 reputation)StrataFrame User (439 reputation)StrataFrame User (439 reputation)StrataFrame User (439 reputation)StrataFrame User (439 reputation)StrataFrame User (439 reputation)StrataFrame User (439 reputation)StrataFrame User (439 reputation)StrataFrame User (439 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Trent,

As a follow-on to my previous posting, please consider this little test. I deployed my DDT package to a fresh database and did NOT deploy any data. All of the relationships where created correctly in the following format:-

ALTER TABLE [dbo].[GAZETTEER] NOCHECK CONSTRAINT [FK_GAZETTEER_DEPOT]

So far, the database is perfect but I haven't deployed my data yet. For the record, the only data I am deploying are the security permission related tables as in the attached screenshot.

Next I ran the same DDT package and this time choose to only deploy data - no schema changes. Before the data was deployed, the same SQL command as above was run for each relationship. The DDT is clearly trying to turn off the constraint before it copies the data and the DDT is making the assumption the constraint is actually turned on - which it wasn't. Then, the data is deployed. Finally, the DDT recreates the relationships but in the incorrect format of:-

ALTER TABLE [dbo].[GAZETTEER] CHECK CONSTRAINT [FK_GAZETTEER_DEPOT]

The DDT makes assumptions about how the relationships should be re-created after the data is deployed. It simply doesn't check how they are defined in the DDT package.

The problem is definitely only there if you deploy data.

Regards,

Aaron
Attachments
DDT Wizard.jpg (101 views, 118.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
I will flag this and look at it when we revisit the DDT next.  Thanks for the heads up.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search