This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
 
Similar Threads
whats the Diff between getHibernateTemplate().getSessionFactory().getCurrentSession() and getSession
Trouble converting a Spring JDBC application for Spring with Hibernate
HibernateTemplate batch Update
parameter not set!
Trouble converting a Spring JDBC app to use Spring Hibernate