Test which demonstrates the problem before fixing it
Change ModelAdapterWriter to write a class literal instead of using a reference to the field. The reference to the field caused NPE if the entity wasn't cached.
fix OllieTest error after adding my OllieCache test.  It didn't like the fact that its DB file was deleted.
Merge pull request #1 from donaldlittlepie/entity-cache-bug

entity-cache-bug