I am facing problem with Hibernate, while fetching the records from table.
Let me explain the problem first and later I will post my code.
Problem: I have written code to fetch the total number of records exists in a table.
So first time when I execute the Class it was returning 4 entries in the table, i.e correct
Next I am Inserting one row to the Table from back end (means using SQLYog I am inserting one row to the Table).
When I execute the same class Now also its returning 4 entries. where it should have to return 5.
I am Not able to get the latest records from the table which I inserted manually to the table.
if your table definitely has 5 records & hibernate is showing 4, then hibernate is only loading 4 entries (pretty obvious).. please check the generated SQL to findout if there are any specific conditions associated for the mapping file (probably at class level).
You don't like waffles? Well, do you like this tiny ad?