title: Save data to database via Spring Data repository
body: <p>I am planning to store data from multiple tables which has one to many JPA relationship. I am creating my Repository interface which extends from JPARepository. My question is If I want to save a data on Many sides of relationship (in the below scenario it's Tour) then shall I do with TourRepository or PersonRespository?</p>
  
  <p>On a similar note Is it ideal to create individual repository classes for every JPA entities where data need to be stored? or any better way with limited repository classes the data store to database can be achieved?</p>
  
  <pre><code>@Entity
  @Table(name="Person")
  public class Person implements Serializable{
  ...
  ...
  @OneToMany(mappedBy = "person")
  private List&lt;Tour&gt; tours;
  ...
  
  
  
  @Entity
  @Table(name = "Tour")
  public class Tour implements Serializable{
  ...
  ...
  @ManyToOne
  @JoinColumn(name = "PERSON_ID")
  private Person person;
  ...
  </code></pre>