*
The moose likes Object Relational Mapping and the fly likes Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate "missing column"" Watch "Hibernate "missing column"" New topic
Author

Hibernate "missing column"

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
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


JDBCSupport - An easy to use, light-weight JDBC framework -
Rajit vreddi
Greenhorn

Joined: Jul 05, 2012
Posts: 17
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

Joined: Feb 23, 2009
Posts: 1183
hi Rajit,

thank you for your reply.

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

best regards

sebastian
 
GeeCON Prague 2014
 
subject: Hibernate "missing column"