Results 1 to 5 of 5

Thread: Store proxy isn't inserting all records

  1. #1

    Default Store proxy isn't inserting all records

    This is my store:

    Ext.define("", {
        extend: '',
        storeId: 'GridOrderTickets',
        model: 'Web.model.GridOrderTicket',
        proxy: {
            type: 'ajax',
            timeout: 300000,
            headers: {
                'Accept': 'application/json; charset=utf-8'
            url: '/api/Orders',
            limitParam: undefined,
            startParam: undefined,
            pageParam: undefined,
            noCache: true,
            actionMethods: {
                create: 'POST',
                read: 'GET',
                update: 'PUT',
                destroy: 'DELETE'
            batchActions: true,
            writer: new{
                allowSingle: false
            reader: new{
                rootProperty: 'Response'
        autoLoad: true
    I have 1601 records that come in from my api but the store is only inserting 1288 of those records. And they are all getting through, because in the load event, the records parameter is showing all 1601 records.

    Does anyone know why not all of them would be inserted?

  2. #2
    Sencha Premium User
    Join Date
    Apr 2007
    Sydney, Australia


    Are there duplicate ids?

    Side note, don't use new for the writer/reader.

  3. #3


    Figured out that the id field we were using was not an int, but an alphanumeric string. And our id field expected int, so it was slicing the back parts of the ids that couldn't parse and therefore getting duplicate ids.

    On the side note, @evant, why should the writer/reader not be used with new?

  4. #4
    Ext JS Premium Member
    Join Date
    Nov 2007
    Greetings from Sol : Earth : Europe : Germany : MV : Rostock : Sdstadt


    Quote Originally Posted by GoonPontoon View Post
    On the side note, @evant, why should the writer/reader not be used with new?
    Because you never should use new. Your code creates one reader and one writer shared by all instances of GridOrderTickets. That my causes som trouble. Besides the reader and the writer are instanciates while creating the class and not while creating the object.

    Instead use this:

    writer: {
        type: 'json',
        allowSingle: false
    reader: {
        type: 'json',
        rootProperty: 'users'

  5. #5


    I haven't had any problems with it, but I also only ever have one instance of GridOrderTickets. So you are saying this way basically makes them static methods of the class, right? Is there something I'm missing here as to why that's inherently bad?

Similar Threads

  1. Replies: 1
    Last Post: 27 Feb 2015, 11:26 AM
  2. Replies: 1
    Last Post: 4 Apr 2013, 12:26 PM
  3. Fetch all records from store using localstorage proxy
    By deepakse in forum Sencha Touch 2.x: Q&A
    Replies: 3
    Last Post: 15 Feb 2013, 10:59 AM
  4. Removing records from a store using an AJAX proxy
    By urk in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 8 Feb 2012, 1:03 AM
  5. Query store after inserting records
    By KPradel in forum Sencha Ext JS Q&A
    Replies: 2
    Last Post: 13 Sep 2011, 1:24 PM

Tags for this Thread

Posting Permissions

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