cascade delete

5 posts, 0 answers
  1. Chom
    Chom avatar
    56 posts
    Member since:
    Dec 2009

    Posted 16 Sep 2013 Link to this post

    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
  2. Chom
    Chom avatar
    56 posts
    Member since:
    Dec 2009

    Posted 16 Sep 2013 Link to this post

    Added:

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

  3. DevCraft banner
  4. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 18 Sep 2013 Link to this post

    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.
  5. Chom
    Chom avatar
    56 posts
    Member since:
    Dec 2009

    Posted 23 Sep 2013 Link to this post

    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
  6. Doroteya
    Admin
    Doroteya avatar
    502 posts

    Posted 26 Sep 2013 Link to this post

    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 >>
Back to Top
DevCraft banner