我什么时候想使用 NSPropertyMapping?
它与不同数据模型之间的映射有关吗?这与其他哪些核心数据类相关?对我来说,这看起来不太明显。合并数据模型?或者这只是一个独立的事情?
例如,我什么时候会使用 NSPropertyMapping?
Does it have to do with mapping between different data models? To which other Core Data classes is this related? It doesn't look too obvious to me where this belongs to. Merging data models? Or is that just a stand-alone thing?
When would I use NSPropertyMapping for example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
迁移数据时使用 NSPropertyMapping模型将源实体(较旧的数据模型)中的属性映射到目标实体(较新的数据模型)中的属性。
在 Xcode 中创建映射模型时,NSPropertyMapping 对象与 NSEntityMapping 对象一起创建,作为 NSMappingModel 的一部分:File > >新文件> iPhone操作系统/Mac操作系统>资源>映射模型。
NSPropertyMapping is used when migrating data models to map a property in a source entity (older data model) to a property in a destination entity (newer data model).
NSPropertyMapping objects are created alongside NSEntityMapping objects as part of a NSMappingModel when creating a mapping model in Xcode: File > New File > iPhone OS / Mac OS > Resource > Mapping Model.