Permalink
Browse files

The model generated by resource and scaffold was different

  • Loading branch information...
1 parent 8b543db commit 5c0cdea89e479eb30d0b11a40313b1d4e6f6d8a4 @MiguelMadero MiguelMadero committed Oct 9, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 templates/resource/model.ejs
@@ -12,6 +12,12 @@ var <%= names.constructor.singular %> = function () {
<% } -%>
});
+<% for(var i in properties) { -%>
+<% if(properties[i].name === 'id' && properties[i].type === 'int') { -%>
+ this.autoIncrementId = true;
+<% } -%>
+<% } -%>
+
/*
this.property('login', 'string', {required: true});
this.property('password', 'string', {required: true});

0 comments on commit 5c0cdea

Please sign in to comment.