'What is a "registered managed object" in Swift core data?

I've been reading the documentation of existingObject(with:), and it states:

If there is a managed object with the given ID already registered in the context, that object is returned directly; otherwise the corresponding object is faulted into the context.

I tried to find out what does register mean here however I couldn't anywhere for the last 1 hour. Then I tried to check if there's any method that let you register the object, which may shed light on the confusion, again I couldn't find any. Then I tried to print out all "register objects" with registeredObjects, the result is also a mystery.

Can anyone please explain or point me to the right source where I can understand what is this registering mechanism for managed object? And if possible maybe also point me to the right direction of understanding how exactly does core data, especially managed context work? (Everytime I thought I finally understood it, there seems to be more mystery)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source