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) {
|
public async getProfileAddressHistory(@Path() addressId: string) {
|
||||||
const record = await this.profileAddressHistoryRepo.find({
|
const record = await this.profileAddressHistoryRepo.find({
|
||||||
where: { profileId: addressId },
|
where: { profileId: addressId },
|
||||||
|
relations: {
|
||||||
|
registrationProvince: true,
|
||||||
|
registrationDistrict: true,
|
||||||
|
registrationSubDistrict: true,
|
||||||
|
currentProvince: true,
|
||||||
|
currentDistrict: true,
|
||||||
|
currentSubDistrict: true,
|
||||||
|
},
|
||||||
select: [
|
select: [
|
||||||
"registrationAddress",
|
"registrationAddress",
|
||||||
"registrationProvinceId",
|
"registrationProvinceId",
|
||||||
"registrationProvince",
|
|
||||||
"registrationDistrictId",
|
"registrationDistrictId",
|
||||||
"registrationDistrict",
|
|
||||||
"registrationSubDistrictId",
|
"registrationSubDistrictId",
|
||||||
"registrationSubDistrict",
|
|
||||||
"registrationZipCode",
|
"registrationZipCode",
|
||||||
"currentAddress",
|
"currentAddress",
|
||||||
"currentProvinceId",
|
"currentProvinceId",
|
||||||
"currentProvince",
|
|
||||||
"currentDistrictId",
|
"currentDistrictId",
|
||||||
"currentDistrict",
|
|
||||||
"currentSubDistrictId",
|
"currentSubDistrictId",
|
||||||
"currentSubDistrict",
|
|
||||||
"currentZipCode",
|
"currentZipCode",
|
||||||
"createdFullName",
|
"createdFullName",
|
||||||
"createdAt",
|
"createdAt",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue