I am working on a project which provides a way to collect data about rooms at a specific address. I have set up a relationship in the data model between the rooms and address tables. The project currently presents a UITableView of addresses which the user is able to drill down via address to another UItableView to view rooms. This is where I am clueless. If there are no rooms, a custom UIView is presented to enter the room data. The user enters the data in the UIView for each data point and then presses save. The IBAction for the save button currently sets the value for each key in the related table. I am assuming it is here that I need to establish the relationship between an address and its rooms, but I cannot find the proper way to do this. I have tried NSSet setWithObject in the setValue method:
[newRoom setValue:[NSSet setWithObject:_address] roomName.text forKey:@"roomName"];
but Xcode wants me to insert a colon between roomName and text.
Ultimately I want the user to be able to choose an address and manage room data for that address, but I am unsure how to establish the relationship between the address and its rooms.
any help would be greatly appreciated.