Spring MVC not adding object to parent with Thymeleaf dynamic form
<p>So I have a dynamic form that I created with thymeleaf and everything submits just fine to the database, however the child object, which in this case is <code>row</code>, is not being saved to the parent <code>studySet</code>.  When I'm in debug mode I can see that the studySet contains an arraylist of however many row objects, but when they're being saved, it's just not being set to the studySet object.</p>

<p>I'll show some code, to see if I'm forgetting to do anything here.  If anyone can see my problem and let me know that would be great.  Thanks in advance</p>

<p>Here's my post method in my controller</p>

<pre><code>@RequestMapping(value="createStudySet", method=RequestMethod.POST)
public String createSetPost (@ModelAttribute StudySet studySet, ModelMap model, @AuthenticationPrincipal User user) {

studySet.setUser(user);
user.getStudySet().add(studySet);

List&lt;Row&gt; rows = studySet.getRows();
studySet.setRows(rows);

studySetRepo.save(studySet);   

return "redirect:/answers";
}
</code></pre>

<p>Also this may be helpful, this is a screenshot of my controller in debug mode, so that you can see that there is rows in the studySet.  </p>

<p><a href="https://i.stack.imgur.com/pzKoX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pzKoX.png" alt="Controller Debug"></a></p>

<p>So, I just want to set those rows to the studySet.  Also I realize that this code is probably useless, but it shows an attempt at what I'm trying to do. <code>List&lt;Row&gt; rows = studySet.getRows(); studySet.setRows(rows);</code>.</p>

<p>Also let me know if it would be useful to see my domain objects, and I would add those to the question.</p>