fix #45 - custom entity value encoders
fix class loading issue with enumerations
fix possible npe in the mongo driver