ios - magical record delete one to many relationship all children -



ios - magical record delete one to many relationship all children -

i have 1 many relationship teacher students. want delete students of given teacher. utilize code this:

[student mr_deleteallmatchingpredicate:[nspredicate predicatewithformat:@"teacher == %@" argumentarray:@[teacher]]];

... deletes given teacher. how prepare this?

i fixed changing delete rule "cascade" "no action".

ios objective-c core-data magicalrecord

Comments

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -