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

seachableColumns doesn't accept camelCase, only snake_case #641

Open
jhrncar opened this issue Jun 9, 2023 · 2 comments
Open

seachableColumns doesn't accept camelCase, only snake_case #641

jhrncar opened this issue Jun 9, 2023 · 2 comments

Comments

@jhrncar
Copy link

jhrncar commented Jun 9, 2023

Issue:
In the configuration of the paginate, property searchableColumns seems bugged. If the column has a name consisting of camelCase, e.g. displayName, will not be mapped correctly and an error displayName column not found in the table will be thrown.
filterableColumns or sortableColumns do not have this issue.

Proof:
This is my entity, it should be said that it is a ViewEntity, I did not test the issue on a basic entity.
image
The pagination is defined as:
image
Produces this error:
image

However, switching to snake_case like this:
image
image
started working:
image

@ppetzold
Copy link
Owner

we don't currently support using different columns names for your entities properties. they must be the same.

happy to accept PR, if you want to work on supporting such feature.

@vsamofal
Copy link
Collaborator

vsamofal commented Sep 6, 2023

@jhrncar I think you can configure typeorm naming strategy, and then it will work.

typeorm-naming-strategies

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

3 participants