I'm studying Hibernate by my self. I've created a query to check the username & password which are passed through the front end.
This works. But the issue is when I make a change in the database, the results shows the old information where it should show the new information. Further I need to redeploy the project or restart the server in order to show the new data.
You can do the changes, but ensure that you update this information through hibernate itself.
That way your entities and their associated cache will be updated first and the changes persisted to the database.
Joined: May 02, 2013
Niraj Jha wrote:When do you make change in the database?
If you are doing same time while application is running then how it will reflect the changes in data from back end as it has loaded in the session earlier.
Ya I've changed the value while the programme is running. As per you, I've cleared the session but it didn't work. The new codes are
If you put java code into jsp page then it is wrong old way. Now it is not good practice. Your jsp page should not contain java code!
You need to understand that entity has three states - transient, persistent and detached. Changes made to entity in persistent state are stored into database when your transaction is committed. I recommend you to pass these free tutorials on hibernate