Skip to content

Commit

Permalink
fix: ORV2-1861 fix company search for legacy companies (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
praju-aot authored Feb 3, 2024
1 parent b8d028e commit f49ab70
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,10 @@ export class CompanyService {
): Promise<PaginationDto<ReadCompanyDto>> {
let companiesQuery = this.companyRepository
.createQueryBuilder('company')
.innerJoinAndSelect('company.mailingAddress', 'mailingAddress')
.innerJoinAndSelect('company.primaryContact', 'primaryContact')
.innerJoinAndSelect('primaryContact.province', 'province')
.innerJoinAndSelect('mailingAddress.province', 'provinceType');
.leftJoinAndSelect('company.mailingAddress', 'mailingAddress')
.leftJoinAndSelect('company.primaryContact', 'primaryContact')
.leftJoinAndSelect('primaryContact.province', 'province')
.leftJoinAndSelect('mailingAddress.province', 'provinceType');

// Apply conditions based on parameters
companiesQuery = companiesQuery.where('company.companyId IS NOT NULL');
Expand Down

0 comments on commit f49ab70

Please sign in to comment.