aspose 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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies 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
HibernateTemplate batch Update
Trouble converting a Spring JDBC app to use Spring Hibernate
parameter not set!
Trouble converting a Spring JDBC application for Spring with Hibernate
whats the Diff between getHibernateTemplate().getSessionFactory().getCurrentSession() and getSession