File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Insert list object in database without using loop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Insert list object in database without using loop" Watch "Insert list object in database without using loop" New topic
Author

Insert list object in database without using loop

partha malik
Greenhorn

Joined: Mar 19, 2012
Posts: 9



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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Insert list object in database without using loop