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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:19:48+00:00 2026-06-17T19:19:48+00:00

When does the ‘add’ event gets fired in a collection? I am in a

  • 0

When does the ‘add’ event gets fired in a collection?

I am in a notion that when i execute something like app.mycollection.create(this.newAttributes()); the add event will be fired.

Actually i do this while initializing a view

window.app.mycollection.on('add',this.render,this)

So ideally, first there should be a post request (when i do a create) and then the get request (my render function fetches rows from backend). But in network console, i get the opposite. I first see a get request and then the post request.

This made me thought that ‘add’ event gets fired immediately after a call to create method without waiting for creation to be complete.

This thus fetches me old data without including the data that has just been created.
Please shed some light.

  • 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-17T19:19:49+00:00Added an answer on June 17, 2026 at 7:19 pm

    You have executed render function immediately. Try update your code:

    window.app.mycollection.on('add', this.render, this)

    EDIT

    Take a look

    Creating a model will cause an immediate "add" event to be triggered
    on the collection, a "request" event as the new model is sent to the
    server, as well as a "sync" event, once the server has responded with
    the successful creation of the model. Pass {wait: true} if you’d like
    to wait for the server before adding the new model to the collection.

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

Sidebar

Related Questions

Does any one know how to add a password length checker on the registration
Does there is any library or algorithm that can do auto detection of tags
I've got a string that has curly quotes in it. I'd like to replace
Does anyone know a good resource that I can use in the browser that
Does anyone know the time complexity of the operations of TreeMap like - subMap,
does anybody of you know about a good way of building string templates, that
Does anyone know if there is a quicker way of editing a record that
Does anyone know a program or online service that allows to create an XML
Does there exist any implementation of C++ (and/or C) that guarantees that anytime undefined
Does server side Dart support sessions like in PHP: <?php session_start(); $_SESSION['fruit'] = 'apple';

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.