File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -187,3 +187,4 @@ extension NSManagedObject {
187187 return managedObjectModel. entitiesByName [ entityName] !
188188 }
189189}
190+
Original file line number Diff line number Diff line change @@ -13,6 +13,16 @@ public protocol Entity {
1313 associatedtype CDQIAttribute : EntityAttribute
1414}
1515
16+ extension Entity where Self: NSManagedObject {
17+ public static func cdqiQuery( managedObjectContext: NSManagedObjectContext ? = nil ) -> Query < Self , Self > {
18+ var query = Query < Self , Self > ( )
19+ if let managedObjectContext = managedObjectContext {
20+ query = query. context ( managedObjectContext: managedObjectContext)
21+ }
22+ return query
23+ }
24+ }
25+
1626public protocol Typed {
1727 static var cdqiStaticType : NSAttributeType { get }
1828 var cdqiType : NSAttributeType { get }
You can’t perform that action at this time.
0 commit comments