Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Saurabh Pillai
Ranch Hand
Posts: 524
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic