This is a migrated thread and some comments may be shown as answers.

IsDependent Not Changing DDL

1 Answer 30 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bryan
Top achievements
Rank 1
Bryan asked on 28 Oct 2015, 10:16 PM

Hello,

 I have ​used IsDependent on a collection in my parent class to attempt to get a cascade delete, but no matter what I do, the constraint does not appear in the DDL. I have specified  that backendConfiguration.Runtime.AllowCascadeDelete = true; as well but no luck. 

 

dashboardComponentMapping
    .HasAssociation(dc => dc.DashboardComponentParameters)
    .WithOpposite(dcp => dcp.DashboardComponent)
    .HasConstraint((dc, dcp) => dc.Id == dcp.DashboardComponentId)
    .IsDependent();

1 Answer, 1 is accepted

Sort by
0
Kaloyan Nikolov
Telerik team
answered on 02 Nov 2015, 09:11 AM
Hi Bryan,

The IsDependent() call instructs Telerik Data Access to handle deletion of the referenced entities 'logically' but not 'physically'. It does not set the cascade delete on the DLL level bit fires additional queries to delete the entities. 

The setting:
backendConfiguration.Runtime.AllowCascadeDelete = true;
is taken into account only by internally generated constraints in case of multi-table entities or vertical inheritance. 

It is not possible to set the cascade delete in associations for the time being. 


Regards,
Kaloyan Nikolov
Telerik
 
Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
Tags
Development (API, general questions)
Asked by
Bryan
Top achievements
Rank 1
Answers by
Kaloyan Nikolov
Telerik team
Share this question
or