magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.79k forks source link

enable relationship's mappedKeyName.[0-9] #1169

Closed yanfeng42 closed 5 years ago

yanfeng42 commented 8 years ago

enable relationship's mappedKeyName.[0-9] 使关系映射真正支持mappedKeyName.[0-9] ,以支持多重key path映射.

tonyarnold commented 8 years ago

The tests should be fixed in master now.

I'm really not sure what this PR is fixing — could you explain it in some detail please?

Also, would you mind updating the comment you've added in this PR to be in English?

Thanks!

yanfeng42 commented 8 years ago

https://github.com/magicalpanda/MagicalRecord/blob/master/Docs/Importing-Data.md,As the Doc says:"Relationships mappedKeyName.[0-9] String Specifies backup keypath names if the key specified by mappedKeyName doesn't exist. Supports the same syntax."; But It Not works Actually!The reason is the original code do nothing when mappedKeyName is not Matching! I try to fix this ,it works well in My Project Now.I want you know this!--That's what I want to say! Maybe My code is not the best,u can fix this issue in you ways!

yanfeng42 commented 8 years ago

"往relationship中导入数据时,要适当适时删除原来的数据: 如果目标实体没有设置模拟主键"relatedByAttribute",就删除此relationship下所有的目标实体对象,以避免引入不必要的冗余数据.", is meas, when import, some data maybe needs be deleted if they can't be reference any more.It's a Personal Issue ,I think;and I give my idea.

yanfeng42 commented 8 years ago

I knew u come China, and I think u Chines maybe well!

Coeur commented 6 years ago

@ios122 can you change your code comment to English?

Coeur commented 5 years ago

A clearer pull request is now available at #1228.