Closed ferranabello closed 11 years ago
In your class, you can override the method "tableName" to reflect your sqlite DB export. So you can create a class called "UsersPhones", but point it to the users_phones table:
+ (NSString*) tableName{
return @"users_phones";
}
Hi @ferranabello, @skiptomyliu almost right, but you should override recordName
method
+ (NSString *)recordName {
// return [self description];
return @"user_phones";
}
This should work as you expect. If not, please, reopen this issue.
@ferranabello, proposed solution didn't work, so I've implemented this feature right now.
You can use source code from master
branch.
Thank you very much @AlexDenisov :+1:
Hello, could it be possible to change the default table name?
I mean, let's suppose I have a prepopulated SQLite database with a table called "users_phones".
To have this working with this library (as far as I know) you have to create an objective-c class called exactly "users_phones". But I want this class to be called "UsersPhones" as any other class in objective-c.
So it could be great to call the class "UsersPhones" and tell the class to load the table "users_phones" instead of searching for the table "UsersPhones" or create one.
Congratulations for this great piece of code. It is really amazing!
Thanks a lot!