         return remoteProperties.flatMap { $0 as? NSAttributeDescription }
     }
     
+    /// An index of remote attribute names and the corresponding attribute
+    /// description.
     public func remoteAttributesByName(_ useLocalNames: Bool = false) -> [String: NSAttributeDescription] {
         return remoteAttributes
             .reduce([String: NSAttributeDescription]()) { remoteAttributesByName, attributeDescription in

        return remoteProperties.flatMap { $0 as? NSRelationshipDescription }
    }
    
    /// An index of remote property names and the corresponding
    /// relationship description
    public func remoteRelationshipsByName(_ useLocalNames: Bool = false) -> [String: NSRelationshipDescription] {
        return remoteRelationships
            .reduce([String: NSRelationshipDescription]()) { remoteRelationshipsByName, relationshipDescription in

            return superentityLocalPrimaryKey
        }
        
        return RemoteMapping.Key.DefaultLocalPrimaryKey.rawValue
    }
}

/// MARK: - Propery Helpers
/// MARK: Remote Properties
extension NSEntityDescription {
    /// The properties represented on the remote.
    public var remoteProperties: [NSPropertyDescription] {
        return properties.filter { !$0.remoteShouldIgnore }
