|
@@ -610,10 +610,11 @@ namespace InABox.Database.SQLite
|
|
|
var cascadeFields = new List<string>();
|
|
|
|
|
|
var props = DatabaseSchema.RootProperties(otherType)
|
|
|
- .Where(x => x.IsEntityLink && x.PropertyType.GetInterfaceDefinition(typeof(IEntityLink<>))?.GenericTypeArguments[0] == type);
|
|
|
+ .Where(x => x.IsEntityLink
|
|
|
+ && x.PropertyType.GetInterfaceDefinition(typeof(IEntityLink<>))?.GenericTypeArguments[0] == type
|
|
|
+ && !x.HasAttribute<ChildEntityAttribute>());
|
|
|
foreach(var prop in props)
|
|
|
- {
|
|
|
- var fieldname = $"{prop.Name}.ID";
|
|
|
+ { var fieldname = $"{prop.Name}.ID";
|
|
|
if(prop.GetAttribute<EntityRelationshipAttribute>() is EntityRelationshipAttribute attr
|
|
|
&& attr.Action == DeleteAction.Cascade)
|
|
|
{
|