Set the role id to be generated
See https://github.com/strongloop/loopback-connector-postgresql/issues/5
This commit is contained in:
parent
14c73cbe9d
commit
6490447fac
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue