Skip to content

Commit

Permalink
adds status to tree with sourcing-locations
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Feb 13, 2023
1 parent d18d6db commit 39e686e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/utils/tree.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ export class ExtendedTreeRepository<
return this.query(
`
with recursive ${snakeCasedEntityName}_tree as (
select entity.id, entity."parentId", entity."name"
select entity.id, entity."parentId", entity."name", entity."status"
from ${snakeCasedEntityName} entity
where id in
(${subQuery})
union all
select "parent".id, "parent"."parentId", "parent"."name"
select "parent".id, "parent"."parentId", "parent"."name", "parent"."status"
from ${snakeCasedEntityName} "parent"
join ${snakeCasedEntityName}_tree "child" on "child"."parentId" = "parent".id
)
Expand Down

0 comments on commit 39e686e

Please sign in to comment.