The following: ``` const qb: QueryBuilder<User> = this.ormRepository .createQueryBuilder("user") .leftJoinAndSelect("user.licences", "licences", "licences.isCurrent = 1") .leftJoinAndSelect("licences.org", "org") .orderBy("user.lastName") .orderBy("user.firstName") .orderBy("org.name") .setParameter("organisationId", organisationId); ``` Only the `.orderBy("org.name")` works. The lastName and firstName are being ignored.
Activity
pleerock commentedon Jan 15, 2017
because new orderBy overrides previous. its by design... You need to use
addOrderByif you want to add new order by criteria.enum type safety #205