Set the role id to be generated

See https://github.com/strongloop/loopback-connector-postgresql/issues/5
This commit is contained in:
Raymond Feng 2014-05-13 13:09:15 -07:00
parent 14c73cbe9d
commit 6490447fac
1 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ var AccessContext = require('./access-context').AccessContext;
// Role model
var RoleSchema = {
id: {type: String, id: true}, // Id
id: {type: String, id: true, generated: true}, // Id
name: {type: String, required: true}, // The name of a role
description: String, // Description
@ -20,8 +20,8 @@ var RoleSchema = {
* Map principals to roles
*/
var RoleMappingSchema = {
id: {type: String, id: true}, // Id
roleId: String, // The role id
id: {type: String, id: true, generated: true}, // Id
// roleId: String, // The role id, to be injected by the belongsTo relation
principalType: String, // The principal type, such as user, application, or role
principalId: String // The principal id
};