What I'm trying to do: create a project set it to a machine (project has machine's id as a foreign key in the database) and everything is working as intended EXCEPT machine_id column in project database is always null. I've tried every article and video on the internet to get this to work and have had zero luck so far.
Here is my Machine class
and the new-projects.html with thymeleaf
In the project controller's /addMachine method (which returns the above new-projects.html), it shows the correct machine id, but once the form is submitted and project gets saved to the database, the machine_id in the database is still null. I don't understand why. Any help would be greatly appreciated. I've been stuck on this for a couple weeks now.