Win a copy of Java Concurrency Live Lessons this week in the Threads 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: 527
  • 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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!