I am using the core data in my application.
I know how to insert a new object into it.which stores songs information into it.
below is my table sturcture
song_id
song_title
song_description
Songs *aSong = (Poem *)[NSEntityDescription insertNewObjectForEntityForName:@"Songs" inManagedObjectContext:myManagedObjectContext];
here i want to know how to check whether the song_id is already available before inserting the object again inside the table.
i mean before inserting the new object, how can i check for existence of it.
also how to check the table is empty?
Pls let me know and thanks
now here if yourSong exists i.e. not null than it id exists.
Hope this helps.