Assignment #4 skills not saving in job table

Hi guys,
I’m finished with Assignment #4 apart from this one failing test from Test Task Four, which has to do with updating the skills code in processAddJobForm.

Right now, when I add a new job in the browser, the relationship between the job and skills is saving in the job_skills table in MySQLWorkbench, but the skills aren’t saving in the job table. I’ve followed the textbook and added in the recommended code just like I did for employerId (which is working) but I can’t figure out why it’s failing and not saving skills.

If anyone had insight I would be super grateful!

Do you have code in your processAddJobForm to handle an employerId that doesn’t exist in your employerRepository?

I don’t – I did briefly add in code that was like the if (result.isEmpty()) {} example in the textbook under the one-to-many relationships section, but I removed that. But I will try adding that back in if it would help with the above?

@rlp390 I put that code back in and it worked! Super simple fix, thanks!

1 Like