fix service relation in servicetype
This commit is contained in:
@ -55,7 +55,6 @@ export class ServiceController {
|
||||
|
||||
const res_count = query;
|
||||
const res_list = query
|
||||
.leftJoinAndSelect("Service.serviceType", "serviceType")
|
||||
.orderBy("Service." + param.order_field, param.order_direction)
|
||||
.offset(offset)
|
||||
.limit(limit);
|
||||
|
||||
@ -27,7 +27,10 @@ export class ServiceModel {
|
||||
}
|
||||
}
|
||||
|
||||
var query = repo.createQueryBuilder("Service");
|
||||
var query = repo
|
||||
.createQueryBuilder("Service")
|
||||
.leftJoinAndSelect("Service.serviceType", "serviceType")
|
||||
|
||||
if (whereAttr.length != 0) {
|
||||
query = query.where(whereAttr.join(" and "), whereVal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user