AlexDenisov / iActiveRecord

ActiveRecord for iOS without CoreData, only SQLite
http://alexdenisov.github.com/iActiveRecord/
MIT License
354 stars 50 forks source link

Problem when change the table name to the same class #38

Closed paulocoutinhox closed 11 years ago

paulocoutinhox commented 11 years ago

I see one problem recently.

When we change the table name in recordName method,  ex: before the table name is "abc" and after i change the table name for the same class to "abcdef", i get a crash when the app initialize and we call that method to connect to database.

pseudo-code:

before

product {     String recordName {            return 'abc';     } }

after:

product {     String recordName {            return 'abcdef';     } }

The correct behavior is the creation of first table, "abc". When i change the table name, another table need be created "abcdef" and the code will use it. I dont know why, but after the first table was created, if i change the string of recordName method, i get a crash when i call that method that initialize the database on AppDelegate.

I dont know if a reference for that table in that class is store in someplace, but something wrong happen.

AlexDenisov commented 11 years ago

I've found the problem, and solution need a little more time then I have today. But I fix this issue ASAP.

AlexDenisov commented 11 years ago

@prsolucoes, I've fixed this issue. The working version is on master.