Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

[Hibernate] Default value for not-null column does not seem to work  RSS feed

 
Saurabh Pillai
Ranch Hand
Posts: 529
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


My interpretation of "default" is, When I need to save an object of this class, if I do not set the value of column "isActive" (using setter method), hibernate will "intelligently" pick the default value while preparing the insert query. but it does not seem to happen. Instead I get following exception,



Any idea?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!