Field inconsistencies with multiple handlers for one model
I have two handlers that represent one model with a slightly different set of fields. Sometimes a field will be missing in a resource where I expect it. This behavior seems to be consistent in a session of the server. When I restart the server, the missing field may (or may not) start showing up. It will consistently be visible (or missing) until the next time the server is restarted.
I tracked this down to the in_typemapper() method of the Emitter. I believe this inconsistency has to do with the order that the typemapper dictionary iterates over its items.
I have attached a patch that returns the handler of the emitter if it matches the type and anonymous requirements of the in_typemapper() method. Otherwise, the existing code looks for a match in the typemapper dictionary.
This patch is good enough for my purposes, though I suspect it may still fall down for nested models.
This may be related to <<issue 64>>.