melkisetog/rupen-melkisetoglu-odesk-ios-test — pull request #4 by melkisetog (2014-03-13 18:27:43+00:00)
Title: Bug 4 fixed.

What was the root cause of the bug?
There were several issues in this case. AllOwners fetch function was tied to ModelsEntity. cleanData function was only deleting AllOwners (which was in buggy case would be ModelsEntity). Also cleanData function was called in the wrong place.

How did you fix the problem?
I tied AllOwners fetch function to OwnerEntity. I cleaned both owner and models entities in cleanData function. Updated the place where cleanData was called in ViewController, so data is filled, requested and cleared. This also prevents the CleanDataException. For convenience formatting description function is added to ModelsEntity class.