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
2828+ (NSDictionary *)propertyAttributes {
2929 NSMutableDictionary *parentAttributes = [[super propertyAttributes ] mutableCopy ];
3030
31- parentAttributes[@" knownObjects" ] = [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeMutableCopy];
31+ parentAttributes[PFRelationStatePropertyName ( knownObjects) ] = [PFPropertyAttributes attributesWithAssociationType: PFPropertyInfoAssociationTypeMutableCopy];
3232
3333 return parentAttributes;
3434}
Original file line number Diff line number Diff line change @@ -19,14 +19,12 @@ @implementation PFRelationState
1919// /--------------------------------------
2020
2121+ (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] };
3028}
3129
3230// /--------------------------------------
Original file line number Diff line number Diff line change 99
1010#import " PFRelationState.h"
1111
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+
1223@interface PFRelationState () {
1324@protected
1425 __weak PFObject *_parent;
You can’t perform that action at this time.
0 commit comments