Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Saving issue #2

Closed
cdm2012 opened this issue May 22, 2016 · 1 comment
Closed

Saving issue #2

cdm2012 opened this issue May 22, 2016 · 1 comment

Comments

@cdm2012
Copy link
Contributor

cdm2012 commented May 22, 2016

When saving a new record, the model is generating a lot of data for the insert, as well as crashing when values of Model are nil. See the NSLog result below for more detail:

2016-05-22 14:00:39.418 ReelKit_Example[74844:593827] called -[Model save]
2016-05-22 14:00:39.419 ReelKit_Example[74844:593827] keys =(
    Certificate,
    Directors,
    Name,
    NotSure,
    "reel_id",
    ReelPlot,
    ReelRating,
    RunTime,
    SubGenre,
    Trailer,
    WatchedBad,
    WatchedGood,
    WatchLater,
    Year
)
2016-05-22 14:00:39.419 ReelKit_Example[74844:593827] columns =Certificate, Directors, Name, NotSure, reel_id, ReelPlot, ReelRating, RunTime, SubGenre, Trailer, WatchedBad, WatchedGood, WatchLater, Year
2016-05-22 14:00:39.419 ReelKit_Example[74844:593827] query =insert into Reel(Certificate, Directors, Name, NotSure, reel_id, ReelPlot, ReelRating, RunTime, SubGenre, Trailer, WatchedBad, WatchedGood, WatchLater, Year) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
2016-05-22 14:00:39.423 ReelKit_Example[74844:593827] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
cdm2012 added a commit that referenced this issue May 22, 2016
@cdm2012
Copy link
Contributor Author

cdm2012 commented May 22, 2016

Fixed in c1155e3

Confirmed in NSLog

Test Suite 'Tests' started at 2016-05-22 14:34:16.385
Test Case '-[Tests testBlackBoxSave]' started.
2016-05-22 14:34:16.385 ReelKit_Example[76978:609812] called -[Model save]
2016-05-22 14:34:16.390 ReelKit_Example[76978:609812] keys =(
    Name,
    "reel_id"
)
2016-05-22 14:34:16.390 ReelKit_Example[76978:609812] columns =Name, reel_id
2016-05-22 14:34:16.390 ReelKit_Example[76978:609812] query =insert into Reel(Name, reel_id) values (?, ?)
2016-05-22 14:34:16.395 ReelKit_Example[76978:609812] called -[Model save]
2016-05-22 14:34:16.395 ReelKit_Example[76978:609812] query =update Reel set Name='Pulp Fiction',reel_id='0110912',WatchedGood='16.05.22.03.02' where _id='3'
Test Case '-[Tests testBlackBoxSave]' passed (0.012 seconds).

Should probably create a new issue in reference to the redundancy of the Name and reel_id updates.

@cdm2012 cdm2012 closed this as completed May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant