CRM-1659: Implement DoctrineExtensions for Oro - added CAST function support for limited number of types