• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use default value of SQL

 
Patrick Kok
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a table which contains some fields ie. record_time, modify_date, are set to now() by default in Postgresql.
Hibernate maps these field and replaces them with null value when they are inserted.
The mapping file needs record_time and modify_date for select.

Is there any way to allow Hibernate to avoid inserting null and allow using of default value of Postgresql?

I use Postgresql 8.4 and Hibernate 3.3.2

Thanks
 
Patrick Kok
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
okay, I solved the problem by appending insert="false" against the property entries.
thanks, anyway
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic