Hi all,
I have a window that looks like so:
Everytime a record is added, I want the repair ID to be set to a unique number that hasn't been used in the table yet. e.g. if there is ID numbers 1,2,3, then when I press +, the ID field should be set to '4'. Also, if one of the records in the table is deleted, so that the ID numbers are: 1,2,4, then when I press +, the number in the Record ID should be set to 3.
At the moment, I have a custom ManagedObject class, where I declare:
-(void)awakeFromInsert {
[self setValue:[NSDate date] forKey:@"date"];
}
In order to set the date to today's date.
How would I go about implementing this unique record ID?
Thanks!