query.addSelect(
`
CASE
WHEN enterprise.bpchk = '1' THEN 3
WHEN enterprise.bpchk = '2' THEN 2
WHEN enterprise.bpchk = '0' THEN 1
ELSE 0
END
`,
'brandplus',
);
query.orderBy({
brandplus: 'DESC',
});
query.skip((page - 1)*40);
query.take(40)
My data length is 95. When 40 pages are printed per page, a total of 3 pages exist. On pages 1 and 2, 40 data are well aligned and operated. The problem appears on page 3. Page 3 shows 15 data in length, but 40 data in length. Orderby of data with a corresponding length of 40 also does not work normally. The cause of this problem is simply unknown. Do you know anyone? Please help me.