Git Product home page Git Product logo

Comments (4)

PaulUithol avatar PaulUithol commented on June 30, 2024

Hmm.. I'd expect a different order altogether, seeing as the comparator is called in Backbone.Collection._add for each model right after creation. I'll look into it.

from backbone-relational.

PaulUithol avatar PaulUithol commented on June 30, 2024

Can't seem to replicate this (neither in Firefox or Chrome), at least not with the versions of Backbone (0.5.3) and Underscore (1.1.7) I'm testing with. Do you still experience this behavior? With ids present, I get the following results:

first mother
child initialized
child initialized
comparator called; model.id=j1
comparator called; model.id=j2
mother initialized
second mother
child initialized
child initialized
comparator called; model.id=j3
comparator called; model.id=j4
mother initialized

from backbone-relational.

PaulUithol avatar PaulUithol commented on June 30, 2024

Come to think of it, this would probably have been fixed for you by upgrading to backbone-relational 0.4, since collection.add and collection.remove are also synced as of that version?

from backbone-relational.

sandstrom avatar sandstrom commented on June 30, 2024

No, I don't have the behavior now (least not with the test case). I'll look at the original code too, but I think you can consider this issue closed.

from backbone-relational.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.