emilsjolander / sprinkles

Sprinkles is a boiler-plate-reduction-library for dealing with databases in android applications
Apache License 2.0
772 stars 84 forks source link

Fix #39 #42

Closed zsiegel closed 10 years ago

zsiegel commented 10 years ago

ensures beforeCreate() is called before content values are grabbed

emilsjolander commented 10 years ago

Awesome! I'd like it if you added a test case for this so we don't have any regressions. There are a couple of test in the ModelTest class which test that callbacks are called, add something there.

zsiegel commented 10 years ago

OK. I will take a look and add some tests.

Zachary Siegel zsiegel87@gmail.com On Feb 12, 2014 5:21 PM, "Emil Sjölander" notifications@github.com wrote:

Awesome! I'd like it if you added a test case for this so we don't have any regressions. There are a couple of test in the ModelTest class which test that callbacks are called, add something there.

Reply to this email directly or view it on GitHubhttps://github.com/emilsjolander/sprinkles/pull/42#issuecomment-34930945 .

zsiegel commented 10 years ago

Go ahead and take a look. I think I covered what we are trying to guard against here. I took the broken sample example from the Notes class.

emilsjolander commented 10 years ago

instead of checking if m.createdAt is not null (this was never a problem), check so that the "created_at" value in the content values is non-null

zsiegel commented 10 years ago

Yes thats right! Good catch thanks!

emilsjolander commented 10 years ago

Great work! i'll make a release now, should be in maven central sometime in the next couple of hours

datadanne commented 10 years ago

Nice work!