title: Hibernate Check Annotation
body: <p>I have a table with three fields, say a, b, c. I would like to add a constraint ensuring that if a is not null, then also b and c are not null. I have done that using following SQL</p>
  
  <pre><code>ALTER TABLE sample 
  ADD CONSTRAINT no_nulls
  CHECK (CASE WHEN a IS NOT NULL THEN b IS NOT NULL AND c IS NOT NULL END)
  </code></pre>
  
  <p>Is there a way to achieve same effect using hibernate annotation @Check? </p>
  
  <p>I can't find a helpful example with that annotation, do developers tend not to use it at all?</p>