rez_core 5.0.90 → 5.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "5.0.90",
3
+ "version": "5.0.91",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -5,6 +5,7 @@ import { Repository } from 'typeorm';
5
5
  import { ListMasterService } from 'src/module/listmaster/service/list-master.service';
6
6
  import { EntityRelation } from '../entity/entity-relation.entity';
7
7
  import { AttributeMaster } from '../entity/attribute-master.entity';
8
+ import { ReflectionHelper } from '../../../utils/service/reflection-helper.service';
8
9
 
9
10
  @Injectable()
10
11
  export class EntityMasterRepository {
@@ -16,20 +17,20 @@ export class EntityMasterRepository {
16
17
  @InjectRepository(EntityRelation)
17
18
  private readonly entityRelationRepo: Repository<EntityRelation>,
18
19
  @InjectRepository(AttributeMaster)
19
- private readonly attributeMasterRepository: Repository<AttributeMaster>
20
+ private readonly attributeMasterRepository: Repository<AttributeMaster>,
21
+ private readonly reflectionHelper: ReflectionHelper,
20
22
  ) {
21
23
  }
22
24
 
23
25
  async getEntityById(id: number): Promise<EntityMaster | null> {
24
26
  let data = await this.entityMasterRepository.findOne({ where: { id } });
25
27
  if (data) {
26
- let listMasterData = await this.entityMasterRepository.query(
27
- `SELECT *
28
- FROM frm_list_master_items
29
- where id = $1`,
30
- [data?.status],
31
- );
32
- data.status = listMasterData?.[0].name;
28
+ const listMasterItemsRepo = this.reflectionHelper.getRepoService('ListMasterItems');
29
+ let listMasterItemsata = await listMasterItemsRepo.findOne({
30
+ where: { id: data.status }
31
+ })
32
+
33
+ data.status = listMasterItemsata?.name;
33
34
  }
34
35
  return data;
35
36
  }