I have imported a mysql from a web app into my iOS app. This database is designed specifically without using foreign keys.
I need to do a Left-Join but I can’t figure out how to do this in iOS core-data without using a relationship.
Is there not a way to just get two tables data using a Data.id == Item.id like syntax in a
NSPredicate???
———-EDITED———-
To put it more specifically I want to take a Data entity with and match the item attribute with the Entity Item’S entity code attribute. Any “objects” that don’t have a match should not be included.
Just like a left join….. Ya feel me?
I am stumped.
Help
Thanks.
You ask “is there no easy way in core data“?
Turns out, it is much easier in core data than in SQL.
Simply make entity
Itema relationship of entityData. Your predicate could then beWhat could be easier than that??
Assumptions: relationship is one-to-one, name of relationship is
item,itemObjectis a managed object of typeItem.For the record: you are actually not even dealing with a table, because Core Data is an object graph and not a database. You will find many discussions on this here on SOF.