I restarted
Jboss server and here is the new exception.
is there anything wrong with mapping?
15:46:21,259 INFO [STDOUT] Hibernate: insert into CSS_User (userId, password, f
irstName, lastName) values (?, ?, ?, ?)
15:46:21,291 INFO [STDOUT] Hibernate: insert into css_candidate (firstName, las
tName, emailId, businessPhone, homePhone, cellPhone, street, apt, city, state, z
ip, country, createDate, modifiedDate, userId) values (?, ?, ?, ?, ?, ?, ?, ?, ?
, ?, ?, ?, ?, ?, ?)
15:46:21,291 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1452, S
QLState: 23000
15:46:21,291 ERROR [org.hibernate.util.JDBCExceptionReporter] Cannot add or upda
te a child row: a foreign key constraint fails (`ssln`.`css_candidate`, CONSTRAI
NT `FK_Candidate_userId` FOREIGN KEY (`userId`) REFERENCES `css_user` (`userId`)
ON UPDATE CASCADE)
why is it not creating record in css_user table? should i save user too?