title: Hql query similar to SaveOrUpdate in hibernate
body: <p>We have <code>saveOrUpdate(Object)</code> function in Hibernate while we use Session and it is easier as we don't have to check whether to perform save or update. but the <code>insert(Object)</code> and <code>update(Object)</code> functions are only there for Stateless Session and i need to use the stateless session as i go with hundreds of thousands of records and hibernate is eating up the memory. Is there any way to replicate the <code>saveOrUpdate(Object)</code> functionality in Stateless Session. or anyway by using Hql query instead of using object to do it through hibernate.</p>