Oracle Solution for Error ora-22971

Solution for Oracle Error ORA-22971

ORA-22971: invalid datatype for PRIMARY KEY-based object identifier

What triggered the Error:

en creating an object view, the datatype of an expression in the WITH OBJECT OID clause is not allowed for PRIMARY KEY-based OID.

What should we do to fix it:

place the expression with one of appropriate scalar datatype.