fix: relation not included in select
This commit is contained in:
parent
6fa61f6ae0
commit
cabc83d189
1 changed files with 8 additions and 6 deletions
|
|
@ -72,22 +72,24 @@ export class ProfileAddressController extends Controller {
|
|||
public async getProfileAddressHistory(@Path() addressId: string) {
|
||||
const record = await this.profileAddressHistoryRepo.find({
|
||||
where: { profileId: addressId },
|
||||
relations: {
|
||||
registrationProvince: true,
|
||||
registrationDistrict: true,
|
||||
registrationSubDistrict: true,
|
||||
currentProvince: true,
|
||||
currentDistrict: true,
|
||||
currentSubDistrict: true,
|
||||
},
|
||||
select: [
|
||||
"registrationAddress",
|
||||
"registrationProvinceId",
|
||||
"registrationProvince",
|
||||
"registrationDistrictId",
|
||||
"registrationDistrict",
|
||||
"registrationSubDistrictId",
|
||||
"registrationSubDistrict",
|
||||
"registrationZipCode",
|
||||
"currentAddress",
|
||||
"currentProvinceId",
|
||||
"currentProvince",
|
||||
"currentDistrictId",
|
||||
"currentDistrict",
|
||||
"currentSubDistrictId",
|
||||
"currentSubDistrict",
|
||||
"currentZipCode",
|
||||
"createdFullName",
|
||||
"createdAt",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue