0
votes

I have 2 stores with different models but same direct proxy configuration. When i load these 2 stores (i call store.load() for both stores at the same time) ext is sending only one request (containing both loads) and the second store is not populated with data. I tried setting batchActions to false with no success. I am using ext direct spring on server side.

Proxy configuration:

proxy: {
        type: 'direct',
        batchActions:false,
        directFn:doctorDirectController.getAll,
        reader:{
            type:'json',
            root:'records'
        }
    }

When i set timeout for 1 sec everything works fine:


    this.doctorStore1.load();
    var me = this;
    setTimeout(function() {
        me.doctorStore2.load();
    }, 1000);

So the 2 questions:

  1. How to force directproxy not to batch getAll requests
  2. Why second store is not being populated with data? The request and response contains tids that match up.
1

1 Answers

0
votes

It turned out to be problem with Spring. To handle cycling references between entities (which caused problems during jackson serialization) i used following annotation

@JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="@doctorId")

When simultaneous 2 store loads occured they were serialized in one batch and send back in one response. The above annotation was removing all the duplicates during json serialization causing second store not to be populated with data.