title: Ljava.lang.Object; cannot be cast when getting multipile fields Hibernate Repository
body: <p>I fresh on spring technology and hibernate. Some days ago i create query getting all rows from table using repository. Today i was try get 2 fields from database. When i try read data form result list i getting <code>Ljava.lang.Object; cannot be cast</code>. This is my enity</p>
  
  <pre><code>@Entity
  @Table(name = "cms")
  public class Cms implements Serializable{
      private static final long serialVersionUID = 1759832392332242809L;
      @Id
      @GeneratedValue
      private Long id_page;
      @Column(nullable = false)
      private String title;
      private String content;
      @Temporal(TemporalType.DATE)
      private Date createDate;
      @Temporal(TemporalType.DATE)
      private Date modifyDate;
      @Column(nullable = true)
      private int createBy;
      @Column(nullable = true)
      private int modifedBy;
      @Column(nullable = false)
      private Boolean inMenu;
      public Cms(Long id_page, String title, String content, Date createDate,
              Date modifyDate) {
          this.id_page = id_page;
          this.title = title;
          this.content = content;
          this.createDate = createDate;
          this.modifyDate = modifyDate;
          this.createBy = 1;
          this.modifedBy = 1;
          this.inMenu = true;
      }
  //getters setters to string
  }
  </code></pre>
  
  <p>Repository </p>
  
  <pre><code>public interface CmsRepository extends Repository&lt;Cms, Long&gt;{
      @Query("Select u.id_page,u.title from Cms u")
  List&lt;Cms&gt; getMenu();
  }
  </code></pre>
  
  <p>And takie this on controller</p>
  
  <pre><code>List&lt;Cms&gt; menus= cmsservice.menuAll();
  System.out.println(menus.get(0).toString()); //error 
  </code></pre>
  
  <p>Some one can explain me on example what is bad and how can fix this, this will helpfull for me.</p>