So I work on a project which use the function toSql but an upgrade of typeOrm make the method change to another element I'm trying to make my code work again and I didn't find anything on the web.
So the PR of the change is this one : https://github.com/typeorm/typeorm/pull/6797
The code where I was using the function :
import { Connection, FindOperator } from 'typeorm';
export abstract class BaseOperator<T> extends FindOperator<T> {
protected constructor(private opType: string, value: FindOperator<T> | T) {
// @ts-ignore
super(opType, value, true, false);
}
abstract buildSql(
connection: Connection,
aliasPath: string,
parameters: string[],
): string;
public toSql(
connection: Connection,
aliasPath: string,
parameters: string[],
): string {
// @ts-ignore
if (this._type === this.opType) {
return this.buildSql(connection, aliasPath, parameters);
}
return super.toSql(connection, aliasPath, parameters);
}
}
Now I've got some request which returns me an error : TypeError: Unsupported FindOperator Function
Hope someone can help me to find out how to make my code work again. Ty !