Page 1 of 1

Create collections of data into db

Posted: Wed Jan 28, 2015 12:35 am
by She

Good Day Team!

Im trying to insert a collections of data into db from localStorageVariable(Array)
but always one record added to the database not all the data. please help.
Screenshot is in below:

this is the collections of data from LSV:

Image

and this is the mapping of Create into db:

Image

Thank you,


Create collections of data into db

Posted: Wed Jan 28, 2015 6:52 pm
by Ihor Didevych

Hi,

Create function in DB are not for bulk objects.
You can create only one object at once.
To make it work you should call your service loop.


Create collections of data into db

Posted: Fri Jan 30, 2015 12:57 am
by She

Hi Lhor,

I have this code and still nothing happens:
this code is in button Click event

var storage = localStorage.getItem('_notloggedArray');

for(i=0;storage.length < i;i++){
CreateMap.execute();
}


Create collections of data into db

Posted: Sat Jan 31, 2015 6:55 pm
by Alena Prykhodko

Please try to debug your code first.
Do you get any error in console?