Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 11 commits into from
Closed

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

wants to merge 11 commits into from

Conversation

yanfeng42
Copy link

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

ios122 added 11 commits January 17, 2016 14:09
enable relationship's mappedKeyName.[0-9]   使关系映射真正支持mappedKeyName.[0-9] ,以支持多重key path映射.
修复导入时, 关系映射无法有效指定多个keypath的bug.
fixed  relationship's mappedKeyName.[0-9] Invalid
修复导入时, 关系映射无法有效指定多个keypath的bug.
fixed relationship's mappedKeyName.[0-9] Invalid
Test
test2
/* 往relationship中导入数据时,要适当适时删除原来的数据:
         如果目标实体没有设置模拟主键"relatedByAttribute",就删除此relationship下所有的目标实体对象,以避免引入不必要的冗余数据. */
往relationship中导入数据时,要适当适时删除原来的数据
@tonyarnold
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

"往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
Copy link
Author

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

@Coeur
Copy link
Collaborator

Coeur commented Nov 9, 2017

@ios122 can you change your code comment to English?

@Coeur
Copy link
Collaborator

Coeur commented Jun 22, 2019

A clearer pull request is now available at #1228.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants