public async deleteById(id: string): Promise<any> { try { return await getManager().delete(this.classType, id); } catch (error) { if (error.code === "SQLITE_CONSTRAINT" && error.errno === 19) { throw { code: "SQLITE_CONSTRAINT", message: `This record can't be deleted since it has references with other parts of data. Please ensure that those are deleted and try this operation` }; } throw error; } }