Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate "missing column"

 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there,

Hibernate is trying to get me angry again.

I have a very simple setup. One Postgres table, which looks like this:




One domain class:



one mapping file






The hbm2ddl.auto property is set to 'validate'.

when i run the following code ...



the following output is given:




for some reason, hibernate can't see the blub property in the database table and it doesn't give me any hint what the proplem is.


hope anyone can help.

thanks - sebastian
 
Rajit vreddi
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in general,You can configure sequence in the .hbm.xml file and it should work if the id exist in corresponding table

 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Rajit,

thank you for your reply.

using the sequence, the whole thing works just fine :-).

best regards

sebastian
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic