Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HSQLDB Indexing Error?

Bob Harrison
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've set up some unit tests using HSQLDB. The unit test adds two entries to the DB. I would expect the entries id numbers to be 1 & 2 but they are 2 & 3! Why? Here's the Spring Bean code:

Here's the object I'm persisting:

Here's the relevant unit test code:

Find by primary key using 1 returns nothing; 2 returns user1 and 3 returns user2.

Can anyone tell me what I'm doing wrong or where I'm thinking wrong?

What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!