Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Relationships mirroring #57

Merged
merged 2 commits into from
Jan 8, 2016
Merged

Conversation

bronenos
Copy link
Contributor

@bronenos bronenos commented Jan 5, 2016

Public overridable Object's extension for relationship mirroring to be able.

Example:

extension Product {
  override func rrc_mapObjectToMirror() -> Product {
    let clone = super.rrc_mapObjectToMirror() as! Product
    clone.category = self.category?.rrc_mapObjectToMirror() as? Category
    return clone
  }
}

@polqf
Copy link
Owner

polqf commented Jan 6, 2016

Hi @bronenos,
Thanks for this PR.

Could you move the method to ObjectExtension.swift ?
Also if you can rename it to something like getMirror, would be great. We don't believe in prefixes since Swift appeared.
I think that with this change the current getMirror top level function makes no sense, so probably its implementation should be now inside the Object Extension method

@bronenos
Copy link
Contributor Author

bronenos commented Jan 7, 2016

Okay, done

@polqf
Copy link
Owner

polqf commented Jan 8, 2016

Hi @bronenos , merging it right now, I'll fix the tests Travis is complaining about

polqf added a commit that referenced this pull request Jan 8, 2016
@polqf polqf merged commit 305829a into polqf:master Jan 8, 2016
@polqf polqf modified the milestone: 0.4.0 Jan 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants