Replies: 3 comments 4 replies
-
what is the data type of userId, date & time ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
this is the table: var metingen = {
name: 'metingen',
columns: {
id: { primaryKey: true, autoIncrement: true },
userID: { notNull: true, dataType: 'number' },
date: { notNull: true, dataType: 'string' },
time: { notNull: true, dataType: 'string' },
unique: { keyPath: ['userID', 'datum', 'tijd'], unique: true }
},
alter: {
}
}; |
Beta Was this translation helpful? Give feedback.
2 replies
-
@nielsnl68 it works. Your keypath is referencing wrong column - it should be like this :
I have also added test case for this, check this commit - d83cf92 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In one of my table i use the following the column:
unique: { keyPath: ['userID', 'date', 'time'], unique: true }
but not sure of this should work, does it?At the end, at this moment it dont work; you can insert double records with same userID, date and time.
Beta Was this translation helpful? Give feedback.
All reactions