hash() produces different hashes after restart of python.
During the last release I changed the implementation of the main table to work like python dictionaries which is a hash map. I added a key hash column to the table and keys would be looked up first by hash and the tested for equality which is the way that python works. However, I discovered after working on a little app that uses midb that the hash values for some types is inconsistent (due to a security concern) between restarts of the python interpreter. So, when I reran the application when using a custom object as a key in a dictionary I recieved a 'KeyError' dispite knowing that the object was actually in the database.
The solution will be to remove saving of hashes (which was being used, like a hashmap, to speed up the return of a result) and go with a slower method which will need to check all keys current hash and equality.