 
 public extension FetchRequest {
     
-    init?(JSONValue: JSON.Value, parameters: [Entity]) {
+    init?(JSONValue: JSON.Value, parameters: Entity) {
         
-        let model = parameters
+        let entity = parameters
         
         guard let jsonObject = JSONValue.objectValue,
-            let entityName = jsonObject[JSONKey.EntityName.rawValue]?.rawValue as? String,
             let sortDescriptorsJSONArray = jsonObject[JSONKey.SortDescriptors.rawValue]?.arrayValue,
             let sortDescriptors = SortDescriptor.fromJSON(sortDescriptorsJSONArray)
             else { return nil }
         
-        // find entity with specified name
+        self.entityName = entity.name
         
-        guard let entity = {
-            for entity in model { if entity.name == entityName { return entity } }
-            return nil
-            }() as Entity? else { return nil }
-        
-        self.entityName = entityName
         self.sortDescriptors = sortDescriptors
         
         if let fetchLimitJSON = jsonObject[JSONKey.FetchLimit.rawValue] {

    
    private enum JSONKey: String {
        
        case EntityName
        case SortDescriptors
        case Predicate // Optional
        case FetchLimit // Optional

        
        var jsonObject = JSONObject()
        
        jsonObject[JSONKey.SortDescriptors.rawValue] = self.sortDescriptors.toJSON()
        
        jsonObject[JSONKey.Predicate.rawValue] = self.predicate?.toJSON()
