0

I have written a simple spring boot application to do CRUD operations on a in memory H2 database, I am loading couple of records into my table using data.sql file.

When I do a findAll on my entity table, I see that it is returning 2 blank entries like this - [{},{}]

I have verified that there are values in the table and I am also able to see the values when I print the list entry explicitly like list.get(0) using overridden toString method.

Please advise me if I am doing anything wrong, I am just writing a simple api which returns all records in that database table.

Thanks, Neeraj

Neeraj M
  • 13
  • 1
  • 1
  • 8

1 Answers1

0

May be the problem is with the Getter and Setter method. If you are using Lombok library, make sure it's installed properly in your IDE and added in your build dependency.

Thirumal
  • 8,280
  • 11
  • 53
  • 103
  • I installed lombok and restarted eclipse, still facing same issue. adding my code here. thanks – Neeraj M Aug 02 '20 at 13:07
  • it's not allowing me to attach code, please advise. thanks – Neeraj M Aug 02 '20 at 13:12
  • I tried that, but it's showing indentation errors. Let me try again. thanks – Neeraj M Aug 02 '20 at 13:19
  • apologies but it's not allowing me to add code, it's a very simple thing..model with lombok annotations Data, NoargsConst, AllArgs, and Entity... a repository extending JpaRepo and controller doing a simple find all using autowired repo instance. – Neeraj M Aug 02 '20 at 13:24
  • Can you add the name of `IDE` and build tool `Maven` or `Gradle`.. – Thirumal Aug 02 '20 at 13:28