title: Can a user defined function be used in the discriminator formula in Hibernate
body: <p>I've created a user defined function in hibernate called bitwiseAnd, and registered it in the dialect constructor as follows:</p>
  
  <pre><code>public SQLServerDialect() {
      super();
      registerFunction("bitwiseAnd", new SqlBitwiseFunction("bitwiseAnd", StandardBasicTypes.INTEGER));
  }
  </code></pre>
  
  <p>I needed to do the same for Oracle as we support that too, and because they have different syntax's with regards to bitwise operations. I was hoping to use this in the @DiscriminatorFormula, but it doesn't seem to see the registered function. Is this possible, or does the discriminator formula only use native SQL?</p>
  
  <p>Thanks,
  R.</p>