• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JUnit and Hibernate

 
Somak Dalui
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?

Thanks,
Somak
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic