BUG: Enforce relationship for INSERTs and UPDATEs


Author
Message
Aaron Young
Aaron Young
Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi all,

It has been many months since my last posting on here. I always enjoy no notice life changes Smile

While it is great to be back I am afraid I think I have a bug with the "Enforce relationship for INSERTs and UPDATEs" relationship property. In my case, I have this property turned off for all relationships but they are always created with the property turned on. Looks like the property is ignored.

Can you have a look please?

Thanks.

Aaron
Edited 15 Years Ago by Aaron Young
Replies
Aaron Young
Aaron Young
Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Thanks for trying it Greg. I have checked it again and it fails for me. I have tried it on both SQL 2005 and 2008.

The attached DDT screenshot shows the settings for a particular relationship. The SQL screenshot shows what it looks like after a completely new database is created. The DDT is set to disable the Enforce FK Constraint but it is created with it turned on in SQL.

I am using the latest version of SF from the website.
Attachments
DDT.jpg (185 views, 32.00 KB)
SQL.jpg (162 views, 120.00 KB)
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Aaron,

The SF team has tested this quite a bit in the last 24 hours. We haven't figured out why this sometimes happens (this occurred for me and Ivan, but Trent couldn't get it to fail), but when we are very precise in the steps taken, it works, every time. It is very likely that there is something the user (i.e you and me) is doing that isn't quite right.

If you can't get it to work, you can send us the package (email it to support@strataframe.net)and we'll see how it works here. Of course, we'd need two packages, one to create the db in its initial state and another one to run the update.

Thanks for your patience with this one, I know it can be frustrating...
Aaron Young
Aaron Young
Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
Hi Greg,

I can't get it to work at all and I don't know what steps I can do differently. In my case it fails when creating a new empty database so only one package is needed which I will email shortly.

Thanks for looking into this one.
Aaron Young
Aaron Young
Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)Advanced StrataFrame User (569 reputation)
Group: StrataFrame Users
Posts: 277, Visits: 1.1K
I have found out where it is going wrong and have sent the details to support. However, just in case anyone else is having the same problem I will post the details here too.

For some reason, if you deploy data packages the relations are created correctly before the data is deployed, then dropped and recreated incorrectly after the data is deployed. To explain further, I created a post deployment script as a temporary fix to set all the relations to “Enforce FK Constraint” to No and I was surprised to see it didn’t work. I then ran a SQL profile and found the following:-

1.       During the database sync phase, the relations were actually created correctly as “Enforce FK Constraint” = no. At this point the relationships are correctly defined as per the database model.

2.       The post-deployment script ran and (needlessly) also set the relations to “Enforce FK Constraint” = no.

3.       The data deployment process ran and after this stage the SQL profiler showed that every relationship was dropped and recreated incorrectly as “Enforce FK Constraint” = yes.

I have found that if I remove all of my deployment data packages then the relationships are created correctly. If I add a simple data package then the relationships are created correctly before the data is deployed, then they are dropped and recreated incorrectly after the data has been deployed. There is nothing complicated about the data package. It is a simple table containing a single record to show the database version and it has no relationships to any other table.

There appears to be a secondary process that drops and recreates the relationships incorrectly which is only triggered when a data package is deployed and this is undoing what has been correctly done up to that point.

Aaron
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Aaron Young - 15 Years Ago
Greg McGuffey - 15 Years Ago
Aaron Young - 15 Years Ago
Greg McGuffey - 15 Years Ago
Aaron Young - 15 Years Ago
                         I have found out where it is going wrong and have sent the details to...
Aaron Young - 15 Years Ago
Rainer Kempf, RK - 14 Years Ago
Aaron Young - 14 Years Ago
Trent L. Taylor - 14 Years Ago
                     Trent, In the DDT I have my relationships setup with "Enforce...
Aaron Young - 14 Years Ago
                         Trent, As a follow-on to my previous posting, please consider this...
Aaron Young - 14 Years Ago
                             I will flag this and look at it when we revisit the DDT next. Thanks...
Trent L. Taylor - 14 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search