EntityRelationship type encoder to mango. Fixes #62