title: Boolean field Hibernate QueryException: could not resolve property
body: <p>I am really newbie to Hibernate and it's been like two hours trying to figure it out how to fix this issue. I am using Hibernate 4 and Postgres 9.3</p>
  
  <p>Given the CatalogBase class</p>
  
  <pre><code>@MappedSuperclass
  public class CatalogBase {
  
      @Id
      @Type(type = "pg-uuid")
      public UUID getId() {
          return id;
      }
  
      public void setId(UUID id) {
          this.id = id;
      }
  
      protected UUID id;
  }
  </code></pre>
  
  <p>And the derived User class</p>
  
  <pre><code>@Entity
  @Table(name="erpuser")
  public class User extends CatalogBase {
      private String lastName;
      private String name;
      private String email;
      private boolean isSystemAdministrator;
  
      @Type(type="org.hibernate.type.StringClobType")
      @Column(nullable = false)
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      @Column(name="lastname")
      @Type(type="org.hibernate.type.StringClobType")
      @NotNull(message = "es campo mandatorio")
      public String getLastName() {
          return lastName;
      }
  
      public void setLastName(String lastName) {
          this.lastName = lastName;
      }
  
      @Column(length = 100,unique = true)
      @NotNull(message = "es campo mandatorio")
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
      @Column(name = "issystemadministrator", nullable = false)
      public boolean isSystemAdministrator() {
          return isSystemAdministrator;
      }
  
      public void setSystemAdministrator(boolean isSystemAdministrator) {
          this.isSystemAdministrator = isSystemAdministrator;
      }
  }
  </code></pre>
  
  <p>I am trying to filter just the first result of a query using Hibernate Criteria. Like this</p>
  
  <pre><code>    public boolean existsSystemAdministrator() throws NoSuchAlgorithmException{
      Criteria criteria=currentSession()
              .createCriteria(User.class)
              .add(Restrictions.eq("isSystemAdministrator", true));
      return  criteria.uniqueResult() != null;
  }
  </code></pre>
  
  <p>But I always get <em>org.hibernate.QueryException: could not resolve property: isSystemAdministrator</em> exception</p>
  
  <p>I have changed to all lowercase since the database field is like that, but it didn't work either. From what I've read Hibernate maps with the Java property, which hasn't been the case as well.</p>
  
  <p>Have tried also change the isSystemAdministrator field to Boolean instead of boolean, but it didn't work out either.</p>
  
  <p>I know this must sound stupid to any Hibernate guru, if someone can come up with an answer that would save me lots of time.</p>
  
  <p>Thanks in advance.</p>