I'm creating web application. I'm using Spring and hibernate. When doing the below,
userprofile.setFirstName(firstname); userprofile.setLastName(lastname); userprofile.setDob(bday); userprofile.setPhoneNumber(telephone); userprofile.setEmailId(email); userprofile.setPassword(password); // userprofile.setCreatedDate(sysdate); session.save(userprofile); t.commit(); Hibernate is generating the below insert query
Hibernate: insert into USER_PROFILE (CREATED_DATE, DATE_OF_BIRTH, EMAIL_ID, FIRST_NAME, LAST_NAME, PASSWORD, PHONE_NUMBER, PROFILE_ID) values (?, ?, ?, ?, ?, ?, ?, ?) which is inserting null value in my created_date field. I've made that created_date field's default value as sysdate. Please help me to sort out this.