Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-14010 in 5.0.2.
  1. #11
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    136
    Vote Rating
    17
    ralscha will become famous soon enough ralscha will become famous soon enough

      0  

    Default

    Quote Originally Posted by wemerson.januario View Post
    is this bug fized EXTJS-14010 ?
    No. Still the same behaviour in 5.0.1. When the application erases a record with model.erase and the model is in an autoSync store it will call the proxy twice.

    As a workaround/solution you could suspend the the autosync of the store temporary.

    Code:
    myStore.suspendAutoSync();
    myModel.erase({
      callback: function(e) {}
    });
    myStore.resumeAutoSync();
    Ralph

  2. #12
    Sencha User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Brazil, Goiânia
    Posts
    558
    Vote Rating
    27
    wemerson.januario has a spectacular aura about wemerson.januario has a spectacular aura about

      0  

    Default

    Quote Originally Posted by ralscha View Post
    No. Still the same behaviour in 5.0.1. When the application erases a record with model.erase and the model is in an autoSync store it will call the proxy twice.

    As a workaround/solution you could suspend the the autosync of the store temporary.

    Code:
    myStore.suspendAutoSync();
    myModel.erase({
      callback: function(e) {}
    });
    myStore.resumeAutoSync();
    Ralph
    Thanks!
    Wemerson Januario
    Blog: http://wemersonjanuario.com.br
    Twitter: @januariocoder
    From: Goiânia, GO, Brazil
    Ext JS developer and consulting

  3. #13
    Sencha User
    Join Date
    May 2014
    Location
    France
    Posts
    32
    Vote Rating
    0
    romainpicxi is on a distinguished road

      0  

    Default

    Thanks

  4. #14
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,810
    Vote Rating
    779
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default

    I'm still not really sure on the use case here. Why call erase on the model instance when the store is managing the records? Why not call drop, which will let the store autoSync the delete?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #15
    Sencha User
    Join Date
    May 2014
    Location
    France
    Posts
    32
    Vote Rating
    0
    romainpicxi is on a distinguished road

      0  

    Default

    Quote Originally Posted by evant View Post
    I'm still not really sure on the use case here. Why call erase on the model instance when the store is managing the records? Why not call drop, which will let the store autoSync the delete?
    I use your solution with drop :-)

  6. #16
    Sencha User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Brazil, Goiânia
    Posts
    558
    Vote Rating
    27
    wemerson.januario has a spectacular aura about wemerson.januario has a spectacular aura about

      0  

    Default

    Quote Originally Posted by evant View Post
    I'm still not really sure on the use case here. Why call erase on the model instance when the store is managing the records? Why not call drop, which will let the store autoSync the delete?
    In my use case, is because I use the callback functions(success, failure) from erase() to do especific rules in my code and drop does not have callback for the droped record.
    Wemerson Januario
    Blog: http://wemersonjanuario.com.br
    Twitter: @januariocoder
    From: Goiânia, GO, Brazil
    Ext JS developer and consulting