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

Feature request: New tag to ignore identity columns on update #679

Open
lampi87 opened this issue Jan 18, 2023 · 0 comments
Open

Feature request: New tag to ignore identity columns on update #679

lampi87 opened this issue Jan 18, 2023 · 0 comments

Comments

@lampi87
Copy link

lampi87 commented Jan 18, 2023

At the moment identity columns are not ignored on using updater for mssql connection like

q = sess.SQL().
  Update("user").
  Set(user).Where("id = ?", 5)
res, err = q.Exec()

This will lead to an error mssql: Cannot update identity column 'id'. because column "id" is included into update SQL query

UPDATE [user] SET ..., [id] = ?, ... WHERE (id = ?)

Is it possible to add an additional tag like omitupdate or something else to mark "id" column to be ignored?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant