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

feat:add before find hook #6488

Closed
wants to merge 1 commit into from
Closed

Conversation

liaosunny123
Copy link

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

Add Before Find Hook.
I find that gorm do not implemention before find hook, but the document mentioned.

User Case Description

@jinzhu
Copy link
Member

jinzhu commented Aug 4, 2023

We don't support BeforeFind by design. https://gorm.io/docs/hooks.html#Querying-an-object

The dest is usually an empty struct before querying, so we don't support BeforeFind due to it might increase misusages

@jinzhu jinzhu closed this Aug 4, 2023
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

Successfully merging this pull request may close these issues.

2 participants