File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed
Parse/Internal/Relation/State Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ @implementation PFMutableRelationState
28
28
+ (NSDictionary *)propertyAttributes {
29
29
NSMutableDictionary *parentAttributes = [[super propertyAttributes ] mutableCopy ];
30
30
31
- parentAttributes[@" knownObjects" ] = [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeMutableCopy];
31
+ parentAttributes[PFRelationStatePropertyName ( knownObjects) ] = [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeMutableCopy];
32
32
33
33
return parentAttributes;
34
34
}
Original file line number Diff line number Diff line change @@ -19,14 +19,12 @@ @implementation PFRelationState
19
19
// /--------------------------------------
20
20
21
21
+ (NSDictionary *)propertyAttributes {
22
- return @{
23
- @" parent" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeWeak],
24
- @" parentClassName" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
25
- @" parentObjectId" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
26
- @" targetClass" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
27
- @" knownObjects" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
28
- @" key" : [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
29
- };
22
+ return @{ PFRelationStatePropertyName (parent): [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeWeak],
23
+ PFRelationStatePropertyName (parentClassName): [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
24
+ PFRelationStatePropertyName (parentObjectId): [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
25
+ PFRelationStatePropertyName (targetClass): [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
26
+ PFRelationStatePropertyName (knownObjects): [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy],
27
+ PFRelationStatePropertyName (key): [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeCopy] };
30
28
}
31
29
32
30
// /--------------------------------------
Original file line number Diff line number Diff line change 9
9
10
10
#import " PFRelationState.h"
11
11
12
+ #import " PFMacros.h"
13
+
14
+ /* *
15
+ Returns NSString representation of a property.
16
+
17
+ @param NAME The name of the property.
18
+
19
+ @return NSString representation of a given property.
20
+ */
21
+ #define PFRelationStatePropertyName (NAME ) @keypath(PFRelationState, NAME)
22
+
12
23
@interface PFRelationState () {
13
24
@protected
14
25
__weak PFObject *_parent;
You can’t perform that action at this time.
0 commit comments