Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jpa hibernate.hbm2ddl.auto = validate issue

 
satish bodas
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
Facing an issue with the "validate" value for hibernate.hbm2ddl.auto

I have executed my DDL statements separately .

I never did like this idea of the ORM tool executing my DDL's !

To prevent this I set the value to validate ( previously tried Create / create-drop )


Now with the value set to Validate - I get the error ::


If I change the setting to "update" things work .

Dont seem to understand why ?
I had also posted the same question on Hibernate forums but didnt get no response ( http://forum.hibernate.org/viewtopic.php?p=2389891 )

Any help in understanding this issue is appreciated
Thanks ,
~satish
[ July 24, 2008: Message edited by: satish bodas ]
 
Rodrigo Lopes
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "validate" option will check if your mapping is consistent with your database. If not, it throws an error.
The "update" option will check if your mapping is consistent with your database. If not, it will update your database to make it consistent to your mapping.

Verify where the childid field is defined and check if it's mapped accordingly to you database.
 
satish bodas
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response .

In the db it is defined as datatype - bigint and in java it is defined as Long

Also when I dont use validate it works fine .

Thanks ,
~satish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic