Is it possible to automatically create inverse relationships in a core data model?
The core data model of my app features about 50 entities with a lot of relationships between them. All of the relationships are uni-directional only (and are only required in one direction).
However Apple discourages you from leaving relationships without inverse (for model consistency reasons) and I believe that the missing inverses are responsible for a number of errors I am currently facing.
开发者_C百科Since I don't really need the inverse relationships functionality-wise, I wonder if it would be possible to have them created automatically by XCode. Going through 50 entities with about 3 relationships each and creating inverses manually seems like a tedious task...
Any help much appreciated!
There's no way to have the inverse relationship automatically created in for you in Xcode4. Please file a feature request bug report for it. I could see this being a really useful feature in Xcode.
It may be impossible to automatically generate inverse relationship without generating proxy class. For example how to generate inverse relationship for a collection that occurs more than one time in a class (e.g. phones, mails, urls in business card)
精彩评论