             if relationshipDescription != nil {
                 
                 // to-one
-                if relationshipDescription!.toMany {
+                if !relationshipDescription!.toMany {
                     
                     let resourceID = jsonPredicateValue as? Int
                     
                     // verify
-                    if resourceID != nil {
+                    if resourceID == nil {
                         
                         let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
                         
                         return (response, userInfo)
                     }
                     
-                    let error = NSErrorPointer()
-                    
-                    let fetchedResource =
-                }
-            }
-            
-        }
+                    let (fetchedResource, error) = self.fetchEntity(entity, withResourceID: resourceID!, usingContext: context, shouldPrefetch: false)
+                    
+                    // error fetching
+                    if error != nil {
+                        
+                        // tell delegate
+                        self.delegate?.server(self, didEncounterInternalError: error!, forRequest: request, userInfo: userInfo)
+                        
+                        let response = ServerResponse(statusCode: ServerStatusCode.InternalServerError, JSONResponse: nil)
+                        
+                        return (response, userInfo)
+                    }
+                    
+                    // not found
+                    if fetchedResource == nil {
+                        
+                        let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
+                        
+                        return (response, userInfo)
+                    }
+                    
+                    // set value
+                    value = fetchedResource!
+                }
+                
+                // to-many relationships
+                else {
+                    
+                    let resourceIDs = jsonPredicateValue as? [Int]
+                    
+                    // verify
+                    
+                    if resourceIDs == nil {
+                        
+                        let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
+                        
+                        return (response, userInfo)
+                    }
+                    
+                    let (fetchResult, error) = self.fetchEntity(entity, withResourceIDs: resourceIDs!, usingContext: context, shouldPrefetch: false)
+                    
+                    // error fetching
+                    if error != nil {
+                        
+                        // tell delegate
+                        self.delegate?.server(self, didEncounterInternalError: error!, forRequest: request, userInfo: userInfo)
+                        
+                        let response = ServerResponse(statusCode: ServerStatusCode.InternalServerError, JSONResponse: nil)
+                        
+                        return (response, userInfo)
+                    }
+                    
+                    // not found
+                    if fetchResult.count != jsonPredicateValue?.count {
+                        
+                        let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
+                        
+                        return (response, userInfo)
+                    }
+                    
+                    // set value
+                    value = fetchResult
+                }
+            }
+            
+            // add optional parameters...
+            
+            // MARK: Predicate Options
+            
+            var option = NSComparisonPredicateOptions.NormalizedPredicateOption // default value
+            
+            let optionNumberObject: AnyObject? = searchParameters![SearchParameter.PredicateOption.toRaw()]
+            
+            if optionNumberObject != nil {
+                
+                let optionNumber = optionNumberObject as? UInt
+                
+                // validate NSUInteger bitmask
+                
+                if optionNumber == nil || optionNumber != NSComparisonPredicateOptions.NormalizedPredicateOption.toRaw() || optionNumber != NSComparisonPredicateOptions.DiacriticInsensitivePredicateOption.toRaw() || optionNumber != NSComparisonPredicateOptions.CaseInsensitivePredicateOption.toRaw() {
+                    
+                    let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
+                    
+                    return (response, userInfo)
+                }
+                
+                option = NSComparisonPredicateOptions.fromRaw(optionNumber!)!
+            }
+            
+            // MARK: Predicate Modifier
+            
+            var modifier: NSComparisonPredicateModifier? = NSComparisonPredicateModifier.DirectPredicateModifier // default value
+            
+            let modifierNumberObject: AnyObject? = searchParameters![SearchParameter.PredicateModifier.toRaw()]
+            
+            if modifierNumberObject != nil {
+                
+                let modifierNumber = modifierNumberObject as? UInt
+                
+                modifier = NSComparisonPredicateModifier.fromRaw(modifierNumber!)!
+                
+                // validate
+                
+                if modifier == nil {
+                    
+                    let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
+                    
+                    return (response, userInfo)
+                }
+            }
+            
+            // create predicate...
+            
+            let leftPredicateExpression = NSExpression(forKeyPath: predicateKey!)
+            
+            let rightPredicateExpression = NSExpression(forConstantValue: value!)
+            
+            fetchRequest.predicate = NSComparisonPredicate(leftExpression: leftPredicateExpression, rightExpression: rightPredicateExpression, modifier: modifier!, type: predicateOperator!, options: option)
+        }
+        
+        // MARK: Sort Descriptors
+        
+        let sortDescriptorsJSONArrayObject: AnyObject? = searchParameters![SearchParameter.SortDescriptors.toRaw()]
+        
+        let sortDescriptorsJSONArray = sortDescriptorsJSONArrayObject as? [[String: Bool]]
+        
+        if sortDescriptorsJSONArrayObject != nil {
+            
+            // empty mutable array
+            var sortDescriptors = [NSSortDescriptor]()
+            
+            // validate
+            if (sortDescriptorsJSONArray == nil || sortDescriptorsJSONArray?.isEmpty != nil) {
+                
+                let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
+                
+                return (response, userInfo)
+            }
+            
+            for sortDescriptorJSON:[String: Bool] in sortDescriptorsJSONArray! {
+                
+                // validate JSON
+                
+                if sortDescriptorJSON.keys.array.count != 1 {
+                    
+                    let response = ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: nil)
+                    
+                    return (response, userInfo)
+                }
+                
+                let key = sortDescriptorJSON.keys.first
+                
+                let ascending = sortDescriptorJSON.values.first
+                
+                let sort = NSSortDescriptor(key: key!, ascending: ascending!)
+                
+                sortDescriptors.append(sort)
+            }
+            
+            fetchRequest.sortDescriptors = sortDescriptors
+        }
+        
+        // Default Sort Descriptors
+        else {
+            
+            let defaultSortDescriptor = NSSortDescriptor(key: self.resourceIDAttributeName, ascending: true)
+            
+            fetchRequest.sortDescriptors = [defaultSortDescriptor]
+        }
+        
+        // MARK: Fetch Limit
+        
+        
         
         return (ServerResponse(statusCode: ServerStatusCode.BadRequest, JSONResponse: ""), [ServerUserInfoKey.ResourceID:0])
     }

        
        let fetchRequest = NSFetchRequest(entityName: entity.name)
        
        // TODO: Move to "else" statement
        
        let defaultSortDescriptor = NSSortDescriptor(key: self.resourceIDAttributeName, ascending: true)
        
        fetchRequest.sortDescriptors = [defaultSortDescriptor]
        
        // add search parameters...
        
        // MARK: Predicate

            }
            
            // convert to Core Data value...
            var value: AnyObject?
            
            // one of these will be nil
            let relationshipDescription: NSRelationshipDescription? = entity.relationshipsByName[predicateKey!] as? NSRelationshipDescription
