swift - Why core data doesn't delete related objects? -
entities driver
, car
in 1:many relationship.
in driver
entity in relationship table have
relationshipname, car , no inverse
when open table graph style in xcode between entities there 2 arrows on car
entity , no arrows on driver
entity.
code deleting object:
let somecar:nsmanagedobject = ... let ed = nsentitydescription.entityforname("driver", inmanagedobjectcontext: context!); managedobjectcontext?.deleteobject(somecar); context?.save(nil);
but delete driver
car intact.
reason not deleting related objects?
Comments
Post a Comment