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, native query is not allowed please take care) 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started