How to store multiple values of a same category in SQL using JAVA Spring orJhipster
<p>I need to write a java code that stores the following in SQL with a single submit button.</p>

<p><a href="https://i.stack.imgur.com/nGTGW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nGTGW.png" alt="enter image description here"></a></p>

<p>I need to retrieve names from another table (employees) and display in the UI and then I have to get inputs ( Salary, Department, Manager) from the user and then I have to store each row into a Table (salary_Details) in SQL.</p>

<p>As per my understandig I can write DTO class as following</p>

<pre><code>private String name1;
private String salary1;
private String department1;
private String manager1;
</code></pre>

<p>But I am not sure about the total number of employees in the employees table.</p>

<ol>
<li>How can i achieve this using JAVA Spring?</li>
<li>How to write DTO class for the UI page to store values?</li>
<li>Is there any alternative way to do this?</li>
</ol>

<p><strong>Note: I am using Jhipster to develop my project, If there is a way to handle this in Jhipster, please let me know.</strong></p>

<p>Thanks in advance.</p>