Skip to content
New issue

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

[BUG]: Object literal may only specify known properties, Cannot set or Update columns not specified as NotNull #3797

Open
1 task done
hnatowbk opened this issue Dec 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hnatowbk
Copy link

hnatowbk commented Dec 18, 2024

Report hasn't been filed before.

  • I have verified that the bug I'm about to report hasn't been filed before.

What version of drizzle-orm are you using?

0.38.2

What version of drizzle-kit are you using?

0.0.00

Other packages

No response

Describe the Bug

When trying to update a record, if the entity being called has nullable parameters, they cannot be updated.

export const tblUser = mysqlTable('user', {
  id: int().primaryKey(),
  name: varchar({ length: 100 }).notNull(),
  timestamp_seen: datetime(),
});

await db.update(tblUser).set({ timestamp_seen: new Date() }).where(eq(tblUser.id, id));

Object literal may only specify known properties, and timestamp_seen does not exist in type

@hnatowbk hnatowbk added the bug Something isn't working label Dec 18, 2024
@memmen
Copy link

memmen commented Dec 18, 2024

I am having the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants