1. #1
    Sencha User TopKatz's Avatar
    Join Date
    Mar 2007
    Vote Rating
    TopKatz is on a distinguished road


    Default Writer insert sends array or object

    Im using a store with a writer with some success. I however ran into an issue when I have the store handle both single and batch inserts.

    When I have the store insert a single item, data goes out as a single object. When I insert a batch, it goes out as an array of objects in data. Is there a way to tell the writer to always send out an array of objects, even if its just one?

    Having to handle both on the back end is a little ugly.


    EDIT - listful:true in the writer config does the trick. RTFM!!!!

  2. #2
    Touch Premium Member
    Join Date
    Aug 2010
    New York, NY
    Vote Rating
    sandeep45 is on a distinguished road


    Question store always sends data out as an array

    i have a store associated with a model. when i create a new record of that model type and add it to the store and then do sync() on the store, it then sends the json with the data in an array. the request looks like this:
    how can i make it as an object not as an array. i would like it to look like:

Thread Participants: 1