Reverted old code of enum ordinal. Added support for ordinals in
EnumType and hence fixed query when using ordinals.