solved bug when Entities mapped with metadata