• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Insert list object in database without using loop

 
Greenhorn
Posts: 9
Eclipse IDE Notepad Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


i have a question about how to save and delete the List<Object> by using spring session without using loop.
I am using hibernate and spring integrated system session = getSessionFactory().getCurrentSession();
i can do it using loop but i think it might be slowing down the system.

public void insertProcessErrorList(List<ProcessError> peList)
throws HibernateException {
session = getSessionFactory().getCurrentSession();
session.beginTransaction();

//??
/*for(ProcessError pe : peList)
{
session.save(pe);
}*/
session.getTransaction().commit();
}



Thanks in Advance...
Partha
 
Do not threaten THIS beaver! Not even with this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic