LK
Size: a a a
LK
LK
O
user.role = { id: 1 }
IK
IK
O
IK
IK
O
BK
user.role = { id: 1 }
https://github.com/typeorm/typeorm/issues/447#issuecomment-298896602
BK
O
https://github.com/typeorm/typeorm/issues/447#issuecomment-298896602
BK
O
O
@ManyToOne(() => Role, { onDelete: 'SET NULL', onUpdate: 'CASCADE' })
role: Role | number;
// role: { id: 3 },
role: 3,
UPD: костыль, тк при выгрузке придется делать проверку на число
IK
@ManyToOne(() => Role, { onDelete: 'SET NULL', onUpdate: 'CASCADE' })
role: Role | number;
// role: { id: 3 },
role: 3,
UPD: костыль, тк при выгрузке придется делать проверку на число
IK
LK
let candidatesQuery = this.candidateRepository.createQueryBuilder('candidates');вообщем создает 2 запроса
candidatesQuery = candidatesQuery.leftJoinAndSelect(`candidates.employeeInfo`, 'employeeInfo');
const {
perPage = DEFAULT_PER_PAGE,
page = DEFAULT_PAGE,
} = pagination;
const skip = (perPage * page) - perPage;
candidatesQuery = candidatesQuery.skip(skip)
.take(perPage);
const { entities, raw } = await candidatesQuery.getRawAndEntities();
distinctAlias
и у него есть LIMIT 25
candidatesQuery = candidatesQuery.leftJoinAndSelect(`candidates.employeeInfo
, 'employeeInfo');` IK
IK