Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8925813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:48:02+00:00 2026-06-15T07:48:02+00:00

In my app, the user creates a collection with a bunch of models. As

  • 0

In my app, the user creates a collection with a bunch of models. As I don’t want to make a ton of requests to the server, I’ve created a custom function that saves these models in batch to the server. The server then responds with all the models including their id, and this is then set to the various models. All working well so far.

The problem I’m having now is that Backbone doesn’t know that at this point all models are synced with the server. So at a later point in the app, when I call model.save() on each model, it sends each model to the server again (which should be only the ones that are changed since the batch operation). How could I let Backbone know that all models are synced? I was looking at the ‘changed’ and ‘hasChanged’ attributes, but am not quite sure if I should manipulate these (I guess not).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:48:04+00:00Added an answer on June 15, 2026 at 7:48 am

    Backbone does not include the feature of tracking changed attributes since last sync with server.

    The changed and hasChanged are not dealing with changed attributes since last sync with server.

    You will have to create your own mechanism for tracking the state of your models:

    1. Each model should have a hasChangedSinceLastSync flag.
    2. Each model should bind (.on) to it’s own change event and set the flag to true.
    3. Override the sync method and set the flag to false once data is returned from the server (for read/create/update).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on an app that creates an user profile. I need to be
I'm building a Rails app which creates a bookmarklet file for each user upon
I've created a simply web radio streaming app, and on of my app user
I have created an app to standardize user creation for our AD domain. Now
I created a Facebook canvas app. I tried using the app as a user.
I want to create a Web app which would allow the user to upload
I've created an app that has several models (say A, B) that are polymorphically
I want to make a language selection dropdown in a site user edit/create page.
I was tasked with creating a simple app to maintain a user's collectibles collection
I have just started working with NodaTime. In my app, the user creates an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.