I am using this code in JUnit to setup Hibernate with HSQLDB. This is without any hibernate.cfg.xml / hibernate.properties.
But I once I run some insert/load I am getting unnecessary errors like DataIntegrityViolationException: Hibernate operation: could not insert: org.hibernate.TransientObjectException which otherwise works fine in a Spring+Hibernate environment.
Even simple load operations is not working. Can anyone please tell me what is wrong with this approach ?