I just started with CoreData yesterday, and I\'m going crazy :( I created a project that uses CoreData (ticked the box -use CoreData). Created the entities, and then created the
Two possible problems
Do you have corresponding @dynamic block in the .m file for these properties and
Dont use Capitalised properties, coding conventions are that properties are lowercase for the first letter at least so that when the compiler synthesises the methods.
@property (nonatomic, retain) NSString * type;
in .h
and
@dynamic type;
in .m
becomes something like
-(void)setType:(NSString *)atype
{
....
[self willChangeValueForKey:@"type"];
[self setPrimitiveValue:atype forKey:@"type"];
[self didChangeValueForKey:@"type"];
}
-(NSString *)type
{
return [self primitiveValueForKey:@"type"];
}
in the background. Though you cant see that code ever.
Case conventions are up to you but Camel Caps is nominally normal with Cocoa. But its much like an object such as Big Furry Cat
becomes bigFurryCat
. Follow the style in the apple examples.
EDIT - change @synthesize to @dynamic