Developer forum

Forum » Development » Saving mutiple products

Saving mutiple products

Magnus Holmberg
Reply
Hi.

Saving mutiple products takes a big effort for the database and therefor takes long time.
It there anyway of saving them in one transaction or saving a whole productcollection at once?

We have a routine that updates hundreds of products.

/Magnus


Replies

 
Morten Snedker
Reply
 Hi Magnus,

Are you talking backend, codewise (API), or..? Some context would be helpful.


Regards
Morten Snedker
 
Magnus Holmberg
Reply
Hi,

Hehe sorry Yes I am talking backend.

We are updating like hundreds of products via a webservice so I am fetching a collection of products from ecomProducts then updating them and it is very time consuming saving the products one by one like product.save(); So I am wondering if there is another way like saving them in one transaction, maybe productcollection.save().

Regards
//Magnus

 

You must be logged in to post in the forum