add sql_mode

This commit is contained in:
kittapath 2025-02-28 14:50:26 +07:00
parent 7b2587be7d
commit f800e74379
2 changed files with 6 additions and 0 deletions

View file

@ -82,6 +82,9 @@ export class ProfileSalaryController extends Controller {
@Get("tenure/{profileId}")
public async getPositionTenure(@Path() profileId: string, @Request() req: RequestWithUser) {
const sql_mode = await AppDataSource.query(
"SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));",
);
const position = await AppDataSource.query("CALL GetProfileSalaryPosition(?)", [profileId]);
const _position = position.length > 0 ? position[0] : [];
const mapPosition =

View file

@ -259,6 +259,9 @@ export class ReportController extends Controller {
tenureTypeCondition = "registryOfficer.Years BETWEEN :tenureMin AND :tenureMax"; //xxxxxxxxxxxx
}
const sql_mode = await AppDataSource.query(
"SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));",
);
const [lists, total] = await AppDataSource.getRepository(viewRegistryOfficer)
.createQueryBuilder("registryOfficer")
.where(nodeCondition, {