Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

where configuration is silently ignored when using QueryBuilder #965

Open
Helveg opened this issue Sep 3, 2024 · 1 comment
Open

where configuration is silently ignored when using QueryBuilder #965

Helveg opened this issue Sep 3, 2024 · 1 comment

Comments

@Helveg
Copy link
Collaborator

Helveg commented Sep 3, 2024

Is there a particular reason why we disable applying the andWhere to the query builder when the original repo argument was not a repository?

    if (config.where && repo instanceof Repository) {
        const baseWhereStr = generateWhereStatement(queryBuilder, config.where)
        queryBuilder.andWhere(`(${baseWhereStr})`)
    }

This bit me in the ass today as my where configuration was silently ignored. We should either apply it, or raise an error when it is given together with a query builder argument.

@Helveg
Copy link
Collaborator Author

Helveg commented Oct 4, 2024

@ppetzold ping? If you let me know how you'd like to proceed I can PR it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant