Results 1 to 2 of 2

Thread: Writer insert sends array or object

  1. #1
    Sencha User TopKatz's Avatar
    Join Date
    Mar 2007
    Vote Rating

    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

    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:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts