Skip to main content
formatting
Source Link
Benjamin Maurer
  • 3.8k
  • 5
  • 31
  • 53

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:

  1. empid
  2. empName
  3. 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

My code empDet emp=repository.findByActiveFlag("Y"); Here empDet is a entity with 3 columns 1.empid 2.empName 3.ActiveFlag

Table with 10 rows so i will use foreach emp.forEach(e-> { ---mycode--- ---and here i got values--

}); Now my question is how to get Column name from Jpa or foreach loop

My code:

empDet emp = repository.findByActiveFlag("Y"); 

Here empDet is a entity with 3 columns:

  1. empid
  2. empName
  3. ActiveFlag

Table with 10 rows so i will use foreach

emp.forEach(e-> { ---mycode--- ---and here i got values-- }); 

Now my question is how to get Column name from Jpa or foreach loop

Source Link
user2240097
  • 311
  • 4
  • 13

How to get column name from JPA

My code empDet emp=repository.findByActiveFlag("Y"); Here empDet is a entity with 3 columns 1.empid 2.empName 3.ActiveFlag

Table with 10 rows so i will use foreach emp.forEach(e-> { ---mycode--- ---and here i got values--

}); Now my question is how to get Column name from Jpa or foreach loop