title: angularjs $resource update using PUT fails when parameter name changes
body: <p>I'm missing something in my understanding or code here...</p>
  
  <p>I've got a very basic CRUD app to list/add/edit/delete categories, and it works fine when I define the primary key on the table as "id", but when I rename the database column to "categoryId", the PUT url does not include the key value, and I end up for a 404 error for an unhandled path...</p>
  
  <p>stack:</p>
  
  <p>IIS 7.5 w/ Slim PHP for RESTful services</p>
  
  <pre><code>// Route excerpt
  ...
            when('/categories',       {templateUrl: 'partials/categoryList.html',   controller: CategoryListCtrl}).
            when('/categories/new',   {templateUrl: 'partials/categoryDetail.html', controller: CategoryNewCtrl}).
            when('/categories/:id',   {templateUrl: 'partials/categoryDetail.html', controller: CategoryEditCtrl}).
  ...
  
  angular.module('myServices', ['ngResource']) 
  .factory('Category', function($resource){ 
      return $resource('../api/index.php/categories/:id', {id:'@categoryId'}, 
          { update: {method:'PUT' } } 
       ); 
  })
  
  
  
  
  // WORKS when attribute is 'id'
  .factory('Category', function($resource){
          return $resource('../api/index.php/categories/:id', {id:'@id'}, 
              { update: {method:'PUT' } }
          );
      })
  
  
  // FAILS with 404 when attribute is 'categoryId'
  .factory('Category', function($resource){
          return $resource('../api/index.php/categories/:id', {id:'@categoryId'}, 
              { update: {method:'PUT' } }
          );
      })
  </code></pre>
  
  <p>Of course there are a number of other places in the code where the name is changed, but the effect I'm seeing seems to be related to the ngResource.</p>
  
  <p>The first method produces an URL that works...</p>
  
  <pre><code> categories/1?description=null&amp;name=Observation&amp;report=null
  /api/index.php
  </code></pre>
  
  <p>The second produces this... </p>
  
  <pre><code> categories?categoryId=1&amp;description=null&amp;name=Observation&amp;report=null
  /api/index.php
  </code></pre>
  
  <p>with the 404 error due to the malformed path.  </p>
  
  <p>Is there another parameter (or directive or something) required to get the renamed attribute to be used in the URL?</p>