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

Use of a table alias does not work with soft delete #5840

Closed
robhafner opened this issue Nov 4, 2022 · 3 comments
Closed

Use of a table alias does not work with soft delete #5840

robhafner opened this issue Nov 4, 2022 · 3 comments
Assignees
Labels
type:with reproduction steps with reproduction steps

Comments

@robhafner
Copy link
Contributor

robhafner commented Nov 4, 2022

GORM Playground Link

go-gorm/playground#541

Description

Our REST API supports an expression filter parameter which is parsed and turned into generated sql code using table aliases. This works fine as long as the model doesn't support soft deletes. If the model supports soft delete the query fails due to the generated is null clause for the soft delete column being generated with as "[table-name]".[soft-delete-column]".

@robhafner
Copy link
Contributor Author

Linking to PR with fix:
#5841

@yaofeng-wang
Copy link

Hi @robhafner, may I ask if you are still working on this issue? If not, I would like to work on it.

@robhafner
Copy link
Contributor Author

Hi @yaofeng-wang, feel free to work on it as I have not had time lately to take another look at it. Thanks!

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

Successfully merging a pull request may close this issue.

3 participants