title: Datatable does not sort elements in primefaces
body: <p>Any idea why the sorting does not work? </p>
  
  <pre><code>&lt;h:form prependId="false"&gt;
  
  &lt;p:dataTable value="#{questionBackingBean.questions}"
          var="question" id="questionTable" paginator="true" rows="15"
          paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
          rowsPerPageTemplate="15,25,50" paginatorPosition="bottom"&gt;
  
  
  &lt;p:column sortBy="#{question.id}"&gt;
      &lt;f:facet name="header"&gt;ID&lt;/f:facet&gt;
      &lt;h:outputText value="#{question.id}" /&gt;
  &lt;/p:column&gt;
  &lt;p:column sortBy="#{question.description}"&gt;
      &lt;f:facet name="header"&gt;Description&lt;/f:facet&gt;
      &lt;h:outputText value="#{question.description}" /&gt;
  &lt;/p:column&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p><strong>Question entity</strong></p>
  
  <pre><code>@Override
      public int hashCode() {
          final int prime = 31;
          int result = 1;
          result = prime * result + id;
          return result;
      }
      @Override
      public boolean equals(Object obj) {
          if (this == obj) {
              return true;
          }
          if (obj == null) {
              return false;
          }
          if (!(obj instanceof Question)) {
              return false;
          }
          Question other = (Question) obj;
          if (id != other.id) {
              return false;
          }
          return true;
      }
  </code></pre>
  
  <p><strong>Backing bean</strong></p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class QuestionBackingBean implements Serializable {
  
      private static final long serialVersionUID = 1L;
  
      @Inject
      private QuestionLocal questionBean;
      private List&lt;Question&gt; questions;
      @Inject
      private Question question;
      private int questionParamId;
  
      public List&lt;Question&gt; getQuestions() {
          questions = questionBean.findAllQuestions();
  
          return questions;
      }
  
      public void setQuestions(List&lt;Question&gt; questions) {
          this.questions = questions;
      }
  
      public Question getQuestion() {
          return question;
      }
  
      public void setQuestion(Question question) {
          this.question = question;
      }
  
      public int getQuestionParamId() {
          return questionParamId;
      }
  
      public void setQuestionParamId(int questionParamId) {
          this.questionParamId = questionParamId;
      }
  
      public void init() {
          question = questionBean.findQuestion(questionParamId);
      }
  
      public String addQuestion() {
          questionBean.createQuestion(question);
          return "../index.xhtml";
      }
  }
  </code></pre>