@@ -50,40 +50,40 @@ public struct Query<M: NSManagedObject, R: NSFetchRequestResult> where M: Entity
5050 public func select< P: Sequence > ( _ properties: P ) -> Query < M , NSDictionary > where P. Iterator. Element: PropertyConvertible {
5151 var builder = self . builder
5252 builder. resultType = . dictionaryResultType
53- builder. properties ??= [ ]
54- builder. properties !. append ( contentsOf: properties. map { $0. cdqiProperty } )
53+ builder. propertiesToFetch ??= [ ]
54+ builder. propertiesToFetch !. append ( contentsOf: properties. map { $0. cdqiProperty } )
5555 return Query < M , NSDictionary > ( builder: builder)
5656 }
5757
5858 public func select( _ properties: PropertyConvertible ... ) -> Query < M , NSDictionary > {
5959 var builder = self . builder
6060 builder. resultType = . dictionaryResultType
61- builder. properties ??= [ ]
62- builder. properties !. append ( contentsOf: properties. map { $0. cdqiProperty } )
61+ builder. propertiesToFetch ??= [ ]
62+ builder. propertiesToFetch !. append ( contentsOf: properties. map { $0. cdqiProperty } )
6363 return Query < M , NSDictionary > ( builder: builder)
6464 }
6565
6666 public func select( _ blocks: ( ( M . CDQIAttribute ) -> PropertyConvertible ) ... ) -> Query < M , NSDictionary > {
6767 var builder = self . builder
6868 builder. resultType = . dictionaryResultType
69- builder. properties ??= [ ]
69+ builder. propertiesToFetch ??= [ ]
7070 let attribute = M . CDQIAttribute ( )
71- builder. properties !. append ( contentsOf: blocks. map { $0 ( attribute) . cdqiProperty } )
71+ builder. propertiesToFetch !. append ( contentsOf: blocks. map { $0 ( attribute) . cdqiProperty } )
7272 return Query < M , NSDictionary > ( builder: builder)
7373 }
7474
7575 public func select( _ block: ( M . CDQIAttribute ) -> [ PropertyConvertible ] ) -> Query < M , NSDictionary > {
7676 var builder = self . builder
7777 builder. resultType = . dictionaryResultType
78- builder. properties ??= [ ]
79- builder. properties !. append ( contentsOf: block ( M . CDQIAttribute ( ) ) . map { $0. cdqiProperty } )
78+ builder. propertiesToFetch ??= [ ]
79+ builder. propertiesToFetch !. append ( contentsOf: block ( M . CDQIAttribute ( ) ) . map { $0. cdqiProperty } )
8080 return Query < M , NSDictionary > ( builder: builder)
8181 }
8282
8383 public func reselect( ) -> Query < M , NSDictionary > {
8484 var builder = self . builder
8585 builder. resultType = . dictionaryResultType
86- builder. properties = nil
86+ builder. propertiesToFetch = nil
8787 return Query < M , NSDictionary > ( builder: builder)
8888 }
8989
@@ -170,15 +170,15 @@ public struct Query<M: NSManagedObject, R: NSFetchRequestResult> where M: Entity
170170
171171 public func objects( ) -> Query < M , M > {
172172 var builder = self . builder
173- builder. properties = nil
173+ builder. propertiesToFetch = nil
174174 builder. propertiesToGroupBy = nil
175175 builder. resultType = . managedObjectResultType
176176 return Query < M , M > ( builder: builder)
177177 }
178178
179179 public func ids( ) -> Query < M , NSManagedObjectID > {
180180 var builder = self . builder
181- builder. properties = nil
181+ builder. propertiesToFetch = nil
182182 builder. propertiesToGroupBy = nil
183183 builder. resultType = . managedObjectIDResultType
184184 return Query < M , NSManagedObjectID > ( builder: builder)
0 commit comments