I'm wanting to make a CoreData entity called "Employees", some "Employees" could have a line manager (or boss).
In basic pseducode, it could be described as:
emp_id (PRIMARY KEY)
emp_name
emp_parent_id (INT *but optional as some people may not have line managers*)
Another example I could use is "articles" an Article could have a parent "article", of course not all articles have a parent article.
The issue I'm having is, I'm not sure how to represent this in Core Data, or even if it can handle such things.
In the Core Data Model maker, I create an entity called "Employee" and then make a relationship which points to itself with optional checked and ensure that there is no cascading deletes, or no inverse relationship.
I am unsure if this is the right way to do it though. Can I make a core data entity relate to itself as an optional parent?
Thanks.