My code empDet emp=repository.findByActiveFlag("Y"); Here:
empDet emp = repository.findByActiveFlag("Y"); Here empDet is a entity with 3 columns 1.empid 2.empName 3.ActiveFlag:
- empid
- empName
- ActiveFlag
Table with 10 rows so i will use foreach emp.forEach(e-> { ---mycode--- ---and here i got values--
emp.forEach(e-> { ---mycode--- ---and here i got values-- }); }); Now Now my question is how to get Column name from Jpa or foreach loop