Creating Relations for iOS

I am trying to create a class Game that has a one to many relation with another class called Players.
Here is the generated class for Game:

@class BackendlessCollection, BackendlessDataQuery;
                    


typedef void(^ResponseCallback)(BOOL isSuccess, id result);
    
@interface Game : BackendlessEntity
        
@property (nonatomic, strong) NSNumber *numOfLocationGrabs;


@property (nonatomic, strong) NSString *ownerId;


@property (nonatomic, strong) NSDate *created;


@property (nonatomic, strong) NSNumber *numOfPlayers;


@property (nonatomic, strong) NSNumber *groupID;


@property (nonatomic, strong) NSNumber *countdownTime;


@property (nonatomic, strong) NSNumber *numOfSeekers;


@property (nonatomic, strong) NSString *password;


@property (nonatomic, strong) NSDate *updated;


@property (nonatomic, strong) NSNumber *timeLimit;


@property (nonatomic, strong) NSString *objectId;




-(Game *)save;
-(void)saveWithCallback:(ResponseCallback)callback;
-(void)remove;
-(void)removeWithCallback:(ResponseCallback)callback;
+(Game *)findById:(NSString *)objectId;
+(void)findById:(NSString *)objectId withCallback:(ResponseCallback)callback;
+(Game *)findFirst;
+(void)findFirstWithCallBack:(ResponseCallback)callback;
+(Game *)findLast;
+(void)findLastWithCallback:(ResponseCallback)callback;
+(BackendlessCollection *)find:(BackendlessDataQuery *)query;
+(void)find:(BackendlessDataQuery *)query withCallback:(ResponseCallback)callback;
@end

Here is the generated class for Player:

@class BackendlessCollection, BackendlessDataQuery;
                   


typedef void(^ResponseCallback)(BOOL isSuccess, id result);
    
@interface Player : BackendlessEntity
        
@property (nonatomic, strong) NSNumber *lattitude;


@property (nonatomic, strong) NSNumber *seeker;


@property (nonatomic, strong) NSString *playerName;


@property (nonatomic, strong) NSNumber *longitude;


@property (nonatomic, strong) NSString *ownerId;


@property (nonatomic, strong) NSDate *updated;


@property (nonatomic, strong) NSString *objectId;


@property (nonatomic, strong) NSString *playerMessage;


@property (nonatomic, strong) NSNumber *hider;


@property (nonatomic, strong) NSDate *created;




-(Player *)save;
-(void)saveWithCallback:(ResponseCallback)callback;
-(void)remove;
-(void)removeWithCallback:(ResponseCallback)callback;
+(Player *)findById:(NSString *)objectId;
+(void)findById:(NSString *)objectId withCallback:(ResponseCallback)callback;
+(Player *)findFirst;
+(void)findFirstWithCallBack:(ResponseCallback)callback;
+(Player *)findLast;
+(void)findLastWithCallback:(ResponseCallback)callback;
+(BackendlessCollection *)find:(BackendlessDataQuery *)query;
+(void)find:(BackendlessDataQuery *)query withCallback:(ResponseCallback)callback;
@end

In the console under Game I have a one to many relation created with Players named playerArray. According to the docs it looks like an NSMutableArray name playersArray should have been created but it wasn’t.
Is this something I need to do manually?
If I do this will it still link the class Game in my project with the class in the console?

Hi Brandon,

It looks like a bug. It should not cause any problems if you add a property for a collection of Players to the Game class. It will match the table schema in console (make sure the property name is the same as the column name in console).

Please let me know if you run into any problems.

Regards,
Mark