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 ourterms of serviceand privacy statement.We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make Gorm AutoUpdateTime work with BulkUpsert #7125

Open
mukul-agarwal-wbdopened this issue Jul 23, 2024 · 1 comment
Open

How to make Gorm AutoUpdateTime work with BulkUpsert #7125

mukul-agarwal-wbdopened this issue Jul 23, 2024 · 1 comment
Assignees
Labels
type:question general questions

Comments

@mukul-agarwal-wbd
Copy link

Your Question

I am using gorm's AutoUpdateTime in my struct against a time field. I am using BulkUpsert operation to update an entity but the time stamp is not getting updated.

Here is the field -LastUpdateDate time.Timegorm: "<-:update;autoUpdateTime" ``

Here is the query -gormInstance.BulkUpsert(ctx, tx, &groupEnrolmentEntries, gorm_models.GetGroupEnrolment().TableName(), clause.OnConflict{ Columns: []clause.Column{{Name: "group_id" }, {Name: "user_id" }}, UpdateAll: true, })

Expected answer

@mukul-agarwal-wbd
Copy link
Author

@jinzhuHey i am sure you guys are doing the best you can, but if someone could look at this soon! thanks

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

No branches or pull requests

2 participants