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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:41:48+00:00 2026-05-26T21:41:48+00:00

So when I save a model on the backend, My api send back a

  • 0

So when I save a model on the backend, My api send back a response telling everything went fine and giving you some other pointers in json format

My problem is that backbone think I want to use that response as attributes of my model and automatically dump them in the model attributes..

I just saved it on the front-end and do not want to save the attributs again.

  • 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-26T21:41:49+00:00Added an answer on May 26, 2026 at 9:41 pm

    That is the what Backbone.Model.parse is for. By default, it is just a pass-through, so you don’t need to call “super”.

    Let’s say you only care about two properties that come back (id and foo) and you don’t care about anything else:

    var myModel = Backbone.Model.extend({
    
        parse : function(resp, xhr) {
            return {
                id:  resp.id,
                foo: resp.foo
            };
        }
    
    });
    

    Note that I included “id” in my example. It is really important that creates (POST) return an id property. Without it, the Backbone model won’t know how to update/delete in the future. Even if it has a different name for id (like “objectId”), you should still set the id in this function.

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

Sidebar

Related Questions

I have ajax request that do 3 missions: Save Model (DB) Send Email Give
My back-end has two separate pages, one for handling the model save request and
I'm trying to perform a basic date calculation in a save model in django,
I have a failing model.save() in my Django app. How can I see the
I am trying to save a model named 'customer' using form_for tag. I do
I am using ActiveRecord and when I call Model.Save which calls repositry.Update and then
I want to see what queries are executed on django's model .save() method. Since
I always read that I should use model = Model(a=5, b=6) model.save() But I
How can you get the SQL for a Django model's .save(), i.e. from django.db
I'm calling save() on a backbone model to do a POST operation on the

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.