We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm trying DenoDB with a simple example : store users in a sqlite database.
But two issues occurs when inserting a user:
What am I missing ?
Minimal example :
class UserModel extends Model { static table = "users"; static timestamps = true; id!: string; login!: string; password!: string; static fields = { id: { type: DataTypes.UUID, primaryKey: true }, login: { type: DataTypes.STRING, length: 20, unique: true }, password: DataTypes.string(128), }; static defaults = { id: () => globalThis.crypto.randomUUID(), }; } const connexion = new SQLite3Connector({ filepath: "test.sqlite3", }); const db = new Database(connexion); db.link([UserModel]); db.sync(); const userDB = await UserModel.create({ login: "test", password: "test", }); console.log(userDB); /* UserModel { id: undefined, login: undefined, password: undefined, affectedRows: 1, lastInsertId: 1 } */
The text was updated successfully, but these errors were encountered:
Hi, so is it a bug, or a misunderstanding?
Sorry, something went wrong.
No branches or pull requests
Hi,
I'm trying DenoDB with a simple example : store users in a sqlite database.
But two issues occurs when inserting a user:
What am I missing ?
Minimal example :
The text was updated successfully, but these errors were encountered: