Hi,
I have just started using hibernate and I have a simple application that creates a few tables, (POJO classes mapped) and inserting data in the tables , so far this is successfull. I end the application and start a new test program:
I initialize
(EntityManagerFactory emf = Persistence.createEntityManagerFactory("hibernatetest");
EntityManager = emf.createEntityManager(); )
and next I do a query upon the database I created before and this is the exception thrown:
javax.persistence.NoResultException: No entity found for query
at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:84)
That is perfectly understanble, for the data I had previously saved in the database it's cleared off and deleted. Has anyone experienced this before?
Why does the data disappear from the database ? Help Pleaseeee!
Thank you,
Tux
|