Vote count:
0
In Sails 0.10, I'm attempting to create a 'user' model that uses the a string (the user name) as the primary key, however Sails/Waterline is allowing the creation of multiple records with identical primary keys.
Here's how the primary key is defined:
module.exports = {
autoPK: false,
attributes: {
username: {
type: 'string',
required: true,
unique: true,
primaryKey: true
},
I've only tried this with sails-disk
. So, what gives?
asked 1 min ago
Sails is allowing multiple records w/ identical primary keys of type string
Aucun commentaire:
Enregistrer un commentaire