Oracle Error ORA-22950: cannot ORDER objects without MAP or ORDER method

Oracle Error Message

ORA-22950: cannot ORDER objects without MAP or ORDER method

Reason for the Error

an object type must have a MAP or ORDER method defined for all comparisons other than equality and inequality comparisons.

Solution

Define a MAP or ORDER method for the object type