YapDatabase icon indicating copy to clipboard operation
YapDatabase copied to clipboard

Detecting at runtime if a view is out of sync with the DB

Open coreyfloyd opened this issue 9 years ago • 0 comments

Due to programmer error, it seems one of our views had its logic updated without bumping the version tag. This manifested itself as a crash on launch. Obviously this is a mistake that we don't want to make again, but for additional safety, I am investigating ways to work around this type of error at runtime.

Two questions:

  1. Is there a way to detect that the view is out of sync programmatically at runtime?
  2. If a view is out of sync, what is the expected behavior? Is it a crash? Or is it undefined?

If I can answer these questions, I am hoping to submit a patch that will allow the views to fix themselves when this situation is encountered.

Any thoughts or insights?

Thanks Corey

coreyfloyd avatar Nov 08 '16 16:11 coreyfloyd