         
         // build URL
         
-        let resourcePath = (self.entitiesByResourcePath as NSDictionary).allKeysForObject(entity).first as? String
-        
-        let searchURL = self.serverURL.URLByAppendingPathComponent(self.searchPath!).URLByAppendingPathComponent(resourcePath!)
+        let resourcePath = self.resourcePathForEntity(entity)
+        
+        let searchURL = self.serverURL.URLByAppendingPathComponent(self.searchPath!).URLByAppendingPathComponent(resourcePath)
         
         let urlRequest = NSMutableURLRequest(URL: searchURL)
         

        })
    }
    
    public func fetchEntity(withName entityName: String, resourceID: UInt, URLSession: NSURLSession, 
    
    // MARK: - Internal Methods
    

        return dataTask
    }
    
    private func getResource(entity: NSEntityDescription, withID resourceID: UInt, URLSession: NSURLSession, completionBlock: ((error: NSError?, managedObject: NSManagedObject?) -> Void)) -> NSURLSessionDataTask {
        
        // build URL
        
        let resourcePath = self.resourcePathForEntity(entity)
        
        
    }
    
    
    // MARK: Cache
