(NSDictionary *)kinveyPropertyToCollectionMapping { return @{ @"contents.aFruit" : @"Fruits", }; }
+(NSDictionary *)kinveyObjectBuilderOptions
{
// reference class map - maps properties to objects
return @{ KCS_REFERENCE_MAP_KEY : @{ @"contents.aFruit" : [fruitObj class]}};
}
Aris Sarris
My problem is with mapping a property inside a Dictionary.
I have a Collection named Fruits of class fruitObj.
I have another collection Garden of class gardenObj.
Inside gardenObj objects I want to store a "contents" Array of Dictionaries withObjectsAndKeys { someQnt,@"quantity",aFruit,@"Fruit"} where "someQnt" stands for quantity of "aFruit" of class fruitObj that already exists in collection Fruits.
How will my aFruit object be stored as a KinveyRef to Fruits Collection?
My store is KCSLinkedAppdataStore.
My problem is with mapping a property inside a Dictionary.
+ (NSDictionary *)kinveyPropertyToCollectionMapping
{
return @{
@"contents.aFruit" : @"movies",
};
}
+(NSDictionary *)kinveyObjectBuilderOptions
{
// reference class map - maps properties to objects
return @{ KCS_REFERENCE_MAP_KEY : @{ @"contents.aFruit" : [fruitObj class]}};
}
Something like this doesn't seem to work
Help!
Thanks