title: Hibernate Batch process : Stateless Session VS Regular Session Native Query
body: <p>As I understand so far stateless sessions are preferred when using batch processes since It will just detach objects doing the process So that persistent context and cache would be free so batch processes are the idle case for that, It is commonly known as plain JDBC Query Engine with queries translated to SQL queries immediately.
  Referenced from : <a href="https://stackoverflow.com/a/14174403/1460591">https://stackoverflow.com/a/14174403/1460591</a></p>
  
  <p>On the other hand, I learned that native queries do the same the one difference I see is that the stateless session can map the result to an entity, Native queries don't do that until mapper is explicitly provided.</p>
  
  <p>So is there another difference and from a performance point of view which is better when doing batch processes?</p>