Hi,
i have a requirement where first i need to insert list of records in to data base then i need to fire an update query to update some column's value of inserted records. but the problem is first it is firing update query and then insert query. how can prevent firing an update query first. for me insert query should be first then update query. please suggest me. following is code snippet.
method(){ if(list != null && list.size() > 0){ for (EntityClass entityClass : list) { this.getHibernateTemplate().merge(entityClass); } } if(true){ methodUpdate(); //this method calls some updating logic. here i used native update sql query. } }
Thanks,
Salmon