I want to fetch all users present under a manager by giving manager Id. My table structure is like given below.
my tree structure is like :
Input user1
my result list should be
user1 =[user2,user3,user4,user5,user6]
Input user3
my result list should be user3 = [user4,user5]
Input user2
my result list should be user2 = [user6]
.
So how can I achieve this result.
updated:
My Entity structure is like below: