Reputation: 692
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:
Upvotes: 0
Views: 141
Reputation: 692
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.
Upvotes: 0