Fix type detection of dumped db entity