title: Persisting timestamp field as Date or Long?
body: <p>I need a consensus on the practice of persisting timestamps, specifically on the pros &amp; cons of using <code>java.util.Date</code> compared to using <code>long</code>.</p>
  
  <p>Scope of this discussion:</p>
  
  <ul>
  <li>Performance</li>
  <li>Querying Flexibility (e.g. date range)</li>
  <li>Any hazards in coding and querying</li>
  <li>Portability (e.g. migration to other DB)</li>
  </ul>
  
  <p>About myself:
  I consider myself to be a beginner in JPA, dabbling in it once in a while, not being able to apply it into production level projects until now. In my current project, I commit myself to use ObjectDB (embedded) through JPA calls.</p>