Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

The model generated by resource and scaffold was different

  • Loading branch information...
commit 5c0cdea89e479eb30d0b11a40313b1d4e6f6d8a4 1 parent 8b543db
@MiguelMadero MiguelMadero authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 templates/resource/model.ejs
View
6 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});
Please sign in to comment.
Something went wrong with that request. Please try again.