mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
CoreStore query multiple entities #138
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @martheli on GitHub (May 24, 2017).
I have read over the readme but I have not seen any examples of how to pull data from two entities if there is a relationship. For example if I had one entity that was Manager and one that was Employee. I wanted the result output to show the employee and the employee's manager. Is this type of query supported in CoreStore?
@JohnEstropia commented on GitHub (May 24, 2017):
I'm not sure I understood your question. You can fetch the employee and then access the manager for that employee. So if you have these entities:
You can fetch the employee
and then access the manager
Does this answer your question?
@martheli commented on GitHub (May 24, 2017):
Ok yes that does answer it. Do you need to set up the entities as classes like you show above for it to work or can I use the xcmappingmodel file to set up the entities only?
@JohnEstropia commented on GitHub (May 24, 2017):
You can create the xcdatamodeld file and let Xcode automatically generate the class code for you.