title: Length of primary key for Long data type in Java (and Hibernate)?
body: <pre>
  log(2^32) / log(10) =~ 9.63295986126
  log(10^0.63295986126) / log(2) =~ 2.10264714605 &gt; 2 bit
  
  log(2^64) / log(10) =~  19.2659197225
  log(10^0.2659197225) / log(2) =~ 0.883366197155 &lt; 2 bit
  </pre>
  
  <p>As you can see 9 digits for <code>Integer</code> doesn't lead to negative values in <code>Integer</code> type.</p>
  
  <p>But 19 digits in <code>Long</code> can cause sign overflow... I usually see <code>NUMBER(18)</code> as type of ID column...</p>
  
  <p>Is it possible to have problem with mapping <code>NUMBER(19)</code> to <code>Long</code> in Hibernate?</p>