This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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
 
It's not a secret anymore!