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

Extend QueryBuilder to support mappings of entity attribute name to a differently named column #2196

Open
muhrin opened this issue Nov 13, 2018 · 0 comments
Assignees

Comments

@muhrin
Copy link
Contributor

muhrin commented Nov 13, 2018

At the moment the way that querybuilder works is that it takes filters and assumes that the name maps directly to a column of the same name. This is not the case in, notably, Group where the type_string attribute is actually stored under a column called type.

The most trivial solution would be just to rename the column type_string in a migration. However a better solution would be to have a backend implementation dependent get_column method that supports mapping the filter key to the correct column in the model. This would, however, require that the concrete QueryBuilder gives the get_column more information, specifically at least the orm class Entity type.

For now, I'm just changing the relevant parts of the code (for Group) to use type instead of type_string.

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

Successfully merging a pull request may close this issue.

3 participants