title: Is there any other way to display data from two entities than using dto
body: <p>For example I have two entities: <strong>User</strong> and <strong>JobOffer</strong>. I want display columns from this two entities at one page. I found that this is possible with DTO and my question is whether it is: <strong>Is it possible to do it in a different way not using DTO?</strong></p>
  
  <p><strong>User.java</strong></p>
  
  <pre><code>@Entity
  @Table(name = "user")
  public class User {
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id_user")
  private Integer id;
  
  @Column(name = "name",nullable = false)
  private String name;
  
  @Column(name = "last_name",nullable = false)
  private String lastName;
  
  @Column(name = "email",nullable = false, unique = true)
  private String email;
  
  @Column(name = "password",nullable = false)
  private String password;
  
  @OneToMany(mappedBy = "user", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
  private List&lt;JobOffer&gt; jobOffers;
  </code></pre>
  
  <p><strong>JobOffer.java</strong></p>
  
  <pre><code>@Entity
  @Table(name = "job_offer")
  public class JobOffer {
  
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "idjob_offer")
  private Integer id;
  
  @Column(name = "title", nullable = false)
  private String title;
  
  @Column(name = "location", nullable = false)
  private String location;
  
  @Column(name = "description" , nullable = false)
  private String description;
  
  @Column(name = "contact", nullable = false)
  private String contact;
  
  @Column(name = "category", nullable = false)
  private String category;
  
  @Column(name = "company_name", nullable = false)
  private String companyName;
  
  @Column(name = "contract_type", nullable = false)
  private String contractType;
  
  @Column(name = "working_time", nullable = false)
  private String workingTime;
  
  @Column(name = "monthly_pay", nullable = false)
  private String monthlyPay;
  
  @Column(name = "position_level", nullable = false)
  private String positionLevel;
  
  @ManyToOne
  @JoinColumn(name = "id_user")
  private User user;
  </code></pre>
  
  <p><strong>JobOfferDTO.java</strong></p>
  
  <pre><code>public class JobOfferDTO {
  
  private String title;
  private String location;
  private String category;
  private String email;
  //getters setters ...
  </code></pre>
  
  <p><strong>JobOfferRepository.java</strong></p>
  
  <pre><code>@Repository
  public interface JobOfferRepository extends JpaRepository&lt;JobOffer, Integer&gt; {
  
  @Query("Select new com.biuropracy.demo.DTO.JobOfferDTO(j.title, j.location, j.category, u.email) 
  from JobOffer j join  j.user u")
  public List&lt;JobOfferDTO&gt; getJobOfferDTO();
  }
  </code></pre>
  
  <p>Everything works fine but is there any other maybe better or simple way to display this columns at one page?</p>