DDS Delete issue

Vote:
 

hi,

I have an issue with some code i am writing that uses the dynamic data store. In the code i have 2 objects registration category and registration statistic. One of registration statistic's properties is registration category - see below for class definitions. when i delete an instance of registration statistic it also deletes from the database the referenced instance of registration category - this is not what i expected it to do. from testing this morning i have found that the dds will not delete a registration category if it is referenced by another registration statistic, so it seems to be checking if the referenced object is used elsewhere before deleting it.

can anyone confirm if this is how the dds normally works? is there a way to tell the store to not delete referenced objects like this?

thanks in advance

Sam

classes:

[DataContract]
public class RegistrationStatistic
{
[DataMember]
public string statValue {get; set;}
[DataMember]
public RegistrationCategory category {get; set;}
}

[DataContract]
public class RegistrationCategory
{
[DataMember]
public string name {get; set;}
}

[Pasting files is not allowed]

#175572
Edited, Feb 23, 2017 11:33
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.