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
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