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 7780645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:57:58+00:00 2026-06-01T18:57:58+00:00

I have an object that’s also saved in the server and I’m creating a

  • 0

I have an object that’s also saved in the server and I’m creating a Backbone model from that object.

But when I save the model, it’s doing a PUT request, which is not what I want. How to tell Backbone that the data is already in the server without doing a fetch?

  • 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-01T18:57:59+00:00Added an answer on June 1, 2026 at 6:57 pm

    Backbone determines the newness of a model by checking if an id is set :

    isNew model.isNew()

    Has this model been saved to the server yet? If the model does not yet have an id, it is considered to be new.

    And when you save a model,

    • if it is new, a POST request will be emitted,
    • if it is an update (an id has been set), a PUT request will be sent

    Backbone Sync documentation


    And as noted by @JayC in the comments :

    If there’s an issue that the id can’t literally be id, you can use idAttribute to say which is the “identity” or key field.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object that downloads a file from a server, saves it into
I have an object that can build itself from an XML string, and write
I have an object that reads from a socket continuously like below: void CSocketReader::ReadComplete
We have an object that derives from DependencyObject, and implements some DependencyProperties. Basically something
I have an object class that stores a database record. There is also a
I have an object that reads data from an Excel file using, which takes
I have an object model that looks like this: public MyObjectInJson { public long
I have an object that is updated from a polling loop on a thread.
I have an object that's used both on the client and server side. GenerateScriptType(typeof(MyClass))
I have an object that looks like this: class Model { public string Category

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.