title: Case-insensitive JPA unique constraint?
body: <p>I'm currently using</p>
  
  <pre><code>@Entity
  public class ... {
  
      /**
       * @return the loginName
       */
      @Column(unique=true)
      public String getLoginName() {
          return loginName;
      }
  </code></pre>
  
  <p>but like to have a case-insensitive constraint such that a login name "UPPERCASE" is not allowed when there is already a login name "uppercase" in the database. Is there anything I can use or do I have to create the dirty workaround of storing a lower case version in a separate column?</p>