Aligned to_obj() signature with Entity.to_obj()