Question: Hello, I am creating a website using java language and spring MVC framework + Thymeleaf for view. In my DB I have a table which
Hello,
I am creating a website using java language and spring MVC framework + Thymeleaf for view.
In my DB I have a table which has a self referencing (hierarchal), I have a table for employees which contains an employee Id and for each employee there is a manager Id.. so an employee can be a manager for other employees.
what I want is nested checkboxes (only show managers who are only managers and there is no manager above them) and when check a manager box, other employees checkboxes under this manager will be shown
I create the table in a DB and I have an entity (exactly like the table in DB), but I don't know how to create query (spring JPA only allowed) to retrieve the managers and employees under them +Thymeleaf nested checkboxes to show what I have explained (managers and employees under them)
Could any expert help me by give me a code to solve this problem with clear code and explaination
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
