title: Collection.get returning undefined in backbone.js
body: <p>I have issue with collection.get and model.get returning undefined. </p>
  
  <p>here is my initializecode</p>
  
  <pre><code>initialize: function () {
      this.collection = new productsCollection();
      this.model = new productModel();
  }
  </code></pre>
  
  <p>here is my render code</p>
  
  <pre><code>this.collection.fetch({
      success: function (product) {
          console.log(product);
          $(that.el).html(_.template(productListTemplate, { products: product.models, _: _ }));
      }
  });
  </code></pre>
  
  <p>my list of products is displaying fine. when i click on each product i get a popup where name can be changed</p>
  
  <p>i want to get the set new name in the model and trigger save</p>
  
  <p>but i am unable to get the model of the product here is the code</p>
  
  <pre><code>$("#productName").val($(e.currentTarget).html());
  
  var ID = $(e.currentTarget).data("id");
  var item = this.collection.get(ID);
  
  console.log("start..........");
  console.log(item);
  console.log(ID)
  //            console.log(this.collection);
  console.log(this.model.get(item));
  console.log("end..........");
  
  $('.modal').modal('toggle');
  </code></pre>
  
  <p>I am able to get the correct id in console but not collections and models</p>
  
  <p>can some one help thanks in advance</p>
  
  <p><em><strong>UPDATE</em></strong>
  here is the complete view code</p>
  
  <pre><code>function ($, _, Backbone, popupModal, productTab, productsCollection, productListTemplate, productModel) {
      var productListView = Backbone.View.extend({
          el: $("#page"),
          initialize: function () {
              this.collection = new productsCollection();
              this.model = new productModel();
              this.model.bind('change', this.loadResults, this);
          },
          render: function () {
              this.loadResults();
          },
          loadResults: function () {
              var that = this;
              this.collection.fetch({
                  success: function (product) {
                      console.log(product);
                      $(that.el).html(_.template(productListTemplate, { products: product.models, _: _ }));
                  }
              });
              var modalWindow = $(".modal").modal({
                  show: false,
                  backdrop: true,
                  closeOnEscape: true
              });
              $('#createProduct').click(function (e) {
                  this.modalWindow.modal('show');
              });
          },
          // This will simply listen for scroll events on the current el
          events: {
              "click #saveProduct": "saveProduct",
              "click .productTabs": "productTabs",
              "click .productDetails": "productDetails"
          },
          saveProduct: function () {
              this.model.set({
                  Name: $('#productName').val()
              });
              this.model.save({ id: this.model.get('id') },
           {
               success: function (model, response) {
                   //                 console.log("success");
               },
               error: function (model, response) {
                   //                 console.log(response);
                   var errorMsg = JSON.parse(response.responseText);
                   $(".errorMessage").html('&lt;div class="alert alert-error"&gt;' + errorMsg.Error + '&lt;/div&gt;');
               }
           });
          },
          productTabs: function (e) {
              e.preventDefault();
              $(this).tab('show');
          },
          productDetails: function (e) {
              e.preventDefault();
              $("#productName").val($(e.currentTarget).html());
              var ID = $(e.currentTarget).data("id");
              var item = this.collection.get(ID);
              console.log("start..........");
              console.log(item);
              console.log(ID)
              //            console.log(this.collection);
              console.log(this.collection.models.get(item));
              console.log("end..........");
              $('.modal').modal('toggle');
          }
      });
      return new productListView;
  });
  </code></pre>
  
  <p><strong>UPDATE</strong> responses</p>
  
  <p><em>this.collection</em></p>
  
  <pre><code>b.hasOwnProperty.e
  _byCid: Object
  _byId: Object
  _onModelEvent: function () { [native code] }
  _removeReference: function () { [native code] }
  length: 2
  models: Array[2]
  0: b.hasOwnProperty.e
  1: b.hasOwnProperty.e
  length: 2
  __proto__: Array[0]
  __proto__: s​
  </code></pre>
  
  <p>It has 2 models and my list also has 2 products</p>
  
  <p><em>this.model</em></p>
  
  <pre><code>_callbacks: Object
  _changed: false
  _changing: false
  _escapedAttributes: Object
  _previousAttributes: Object
  attributes: Object
  ID: ""
  Name: ""
  hRef: ""
  __proto__: Object
  cid: "c2"
  __proto__: s
  </code></pre>
  
  <p>The attributes are empty</p>
  
  <p><em>this</em> gives me following</p>
  
  <pre><code>cid: "view1"
  collection: b.hasOwnProperty.e
  _byCid: Object
  _byId: Object
  _onModelEvent: function () { [native code] }
  _removeReference: function () { [native code] }
  length: 2
  models: Array[2]
  __proto__: s
  model: b.hasOwnProperty.e
  _callbacks: Object
  _changed: false
  _changing: false
  _escapedAttributes: Object
  _previousAttributes: Object
  attributes: Object
  cid: "c2"
  __proto__: s
  options: Object
  __proto__: s
  </code></pre>
  
  <p><strong>UPDATE</strong> This is what i see when i expand my collections</p>
  
  <pre><code>b.hasOwnProperty.e
  _byCid: Object
  _byId: Object
  _onModelEvent: function () { [native code] }
  _removeReference: function () { [native code] }
  length: 2
  models: Array[2]
  0: b.hasOwnProperty.e
  _callbacks: Object
  _changed: false
  _changing: false
  _escapedAttributes: Object
  _previousAttributes: Object
  attributes: Object
  ID: "7e0c94fc-7c16-45c9-84a9-a0690103b946"
  Name: "dsa"
  hRef: "Product/dsa"
  __proto__: Object
  cid: "c3"
  collection: b.hasOwnProperty.e
  __proto__: s
  1: b.hasOwnProperty.e
  length: 2
  __proto__: Array[0]
  __proto__: s
  </code></pre>