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

  • Home
  • SEARCH
  • 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 6899575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:26:19+00:00 2026-05-27T07:26:19+00:00

Posts.create({‘body’:post_body}); When I call that, Backbone will hit my sever with an AJAX post

  • 0
Posts.create({'body':post_body});

When I call that, Backbone will hit my sever with an AJAX post request, creating that post. My server will then return a JSON with the “full” post.

Perfect! But now, I want the newly created model to to have the full data. In other words, I don’t want it to only have the body attribute. (all my other models have other data).

My question is:

  • will backbone automatically update the model with the “full” data because my server returned that full JSON?
  • if not, how can I get Backbone to update that model so its data is full?

Edit: I did this, and it seems like Backbone automatically uses the data returned as the new model. Can someone confirm?

success:function(post){
    console.log(post.toJSON()); //Yay! latest version.
},
  • 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-05-27T07:26:20+00:00Added an answer on May 27, 2026 at 7:26 am

    Yes, the model will be updated with any additional info your server returns.

    This is because under the model’s create method, there is a call to save, which intern calls model.set within it, in order to update the model with any amended (or new attributes).

    As the source code comment for this method states:

    If the server returns an attributes hash that differs, the model’s state will be set again.

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

Sidebar

Related Questions

I'm trying to create a post button that inserts the latest posts into a
I'm trying to create a POST request, unfortunately the body of the POST never
There are other posts that say you can create a control in windows forms
Is there any web language that allows the client itself to create HTTP posts
I have a website that allows a user to create blog posts. There are
Are there any plugins for WordPress that allow users to create blog posts without
I am working on a simple django app that allows users to create posts
I'm trying to create an if statement in PHP that prevents a single post
I create a WordPress plugin and I like to post posts from WordPress in
I want to create a wordpress plugin that can catch POST/GET requests to a

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.