• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HSQLDB & Hibernate

 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am adding two rows to my table via hibernate and it is showing them up in console. But the table "Messages" does not exist in HSQLDB.


What may be the reason? Am I missing on HSQLDB configuration?
 
Carles Gasques
Ranch Hand
Posts: 199
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look to hibernate.hbm2ddl.auto
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have set it to "create" in my configuration. It still doesn't create the table, hibernate code is however generating two rows and displaying them off.
 
Carles Gasques
Ranch Hand
Posts: 199
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you running HSQLDB in server mode?

What IDE do you use to browse the database?

 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carles Gasques wrote:Are you running HSQLDB in server mode?

What IDE do you use to browse the database?



I use following command to view the database

It opens up a connect UI where in i supply these settings
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it works but changes are not immediate and very sporadic as after running following code, the output shows three messages


However in db there are only two old rows, "Hello world!" and "Hello worlds!"

 
Carles Gasques
Ranch Hand
Posts: 199
1
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Try to run your database in server mode Hsqldb Server and then browse with the IDE.


Best reggards,

 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carles Gasques wrote:Hi,
Try to run your database in server mode Hsqldb Server and then browse with the IDE.


Best reggards,


Thanks. The server started normally


But the UI pops up a message
 
Carles Gasques
Ranch Hand
Posts: 199
1
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I understand that if you run a database with the command
the connection string would be

Cheers,
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a ton. It works.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic