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

cascade delete

4 Answers 55 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.
Chom
Top achievements
Rank 1
Chom asked on 16 Sep 2013, 04:06 PM
Hello,

I have created my database model using fluent mapping code only and I am trying to implement CascadeDelete property which is currently not resolving in the backend config in my context class.

public static BackendConfiguration GetBackendConfiguration()

{

BackendConfiguration backend = new BackendConfiguration();

backend.Runtime.AllowCascadeDelete = true;

backend.Backend = "SqlCe";

backend.ProviderName = "Microsoft.SqlServerCe.Client.3.5";

return backend;

}


The error message is:

‘Telerik.OpenAccess.BackendConfiguration.RuntimeConfiguration' does not contain a definition for 'AllowCascadeDelete' and no extension method 'AllowCascadeDelete' accepting a first argument of type 'Telerik.OpenAccess.BackendConfiguration.RuntimeConfiguration' could be found (are you missing a using directive or an assembly reference?

I am referencing the following in my class:

using Telerik.OpenAccess;

using Telerik.OpenAccess.Metadata;

using Telerik.OpenAccess.Metadata.Fluent;


and am not sure what else to reference.

thank you

chom

4 Answers, 1 is accepted

Sort by
0
Chom
Top achievements
Rank 1
answered on 16 Sep 2013, 04:09 PM

Added:

using Telerik.OpenAccess.Runtime;
and CascadeDelete still not resolving.

0
Alexander
Telerik team
answered on 18 Sep 2013, 03:49 PM
Hi Chom,

Please excuse us for the inconvenience caused, it turned out that the documentation has been uploaded earlier than the actual setting was publicly released. This setting is now available in the 2013 Q3 Beta version of OpenAccess which has just been released and you should be able to download.

However, please note that the AllowCascadeDelete option applies only to persistent classes which are mapped to more than one table - this is valid for vertically mapped derived types or multi-table entities. If you would like to delete an object and its related ones (via a foreign key or M:N association), please use the IsDependent() fluent mapping method.

Regards,
Alexander
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
0
Chom
Top achievements
Rank 1
answered on 23 Sep 2013, 01:03 PM
Hi Alexander,

Thank you for the information. Can you tell me if this new release of Q3 ORM - will it accommodate creating Sql compact 4.0?

Regards,
Chom
0
Doroteya
Telerik team
answered on 26 Sep 2013, 02:57 PM
Hi Chom,

Generally, Telerik OpenAccess ORM already supports SQL Compact 4.0.

From the provided information, however, I was not able to determine if you are experiencing any issues with it. If that is the case, could you please kindly share a little bit more details?

I am looking forward to your feedback.


Regards,
Doroteya
Telerik
OpenAccess ORM Q3 2013 Beta is available for immediate download in your account. Get it now and play with the latest bits. See what's new >>
Tags
Development (API, general questions)
Asked by
Chom
Top achievements
Rank 1
Answers by
Chom
Top achievements
Rank 1
Alexander
Telerik team
Doroteya
Telerik team
Share this question
or