motion/cdq.rb in cdq-0.1.5 vs motion/cdq.rb in cdq-0.1.6
- old
+ new
@@ -64,9 +64,13 @@
target_class = NSClassFromString(entity_description.managedObjectClassName)
if entity_description.nil?
raise "Cannot find an entity named #{obj}"
end
CDQTargetedQuery.new(entity_description, target_class)
+ when NSEntityDescription
+ entity_description = obj
+ target_class = NSClassFromString(entity_description.managedObjectClassName)
+ CDQTargetedQuery.new(entity_description, target_class)
when Symbol
CDQPartialPredicate.new(obj, CDQQuery.new)
when CDQObject
obj
when NSManagedObject