IsDependent Not Changing DDL

2 posts, 0 answers
  1. Bryan
    Bryan avatar
    14 posts
    Member since:
    Jan 2015

    Posted 28 Oct 2015 Link to this post


     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. 


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

  2. Kaloyan Nikolov
    Kaloyan Nikolov avatar
    118 posts

    Posted 02 Nov 2015 Link to this post

    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. 

    Kaloyan Nikolov
    Check out the latest announcement about Telerik Data Access vNext as a powerful framework able to solve core development problems.
  3. DevCraft banner
Back to Top