문제

I simply want to create entities yet not to be saved, only inspect them.

Can I create a temporary context for those? Is there a way to move them into the persistent context once I decided to store them?

And the point: are these features available trough MagicalRecord API?

도움이 되었습니까?

해결책

Create a new NSManagedContext that has parentContext property set to your main context, and create new objects in the new context - you can do everything you want with those objects, then later either save the new context (this will move the objects to the main context) or just discard it - the objects will be gone.

Seems that there stands an +(NSManagedObjectContext*)MR_contextWithParent: for that in MagicalRecord.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top