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

Ensure same variable name is used in WHERE clause as in SELECT/FROM #124

Merged
merged 1 commit into from
Aug 16, 2023

Commits on Aug 16, 2023

  1. Ensure same variable name is used in WHERE clause as in SELECT/FROM

    Most of the time, QueryDSL `PathBuilderFactory` uses the same variable
    name as in the generated `Q*` classes (which is used in select/from by
    spring-data-rest using the `EntityPathResolver`). However, this breaks
    down when an entity is used that would have a reserved keyword as simple
    name.
    
    In that case, the generated `Q*` class has a '1' appended to the
    variable (to avoid using a reserved keyword), but the
    `PathBuilderFactory` does not. (See
    querydsl/querydsl#1891 for the rationale).
    
    We must use the same strategy for naming our predicates as used by
    spring-data-rest to make this work, so a Thunx `PathBuilderFactory`
    interface is introduced, together with an implementation that creates a
    `PathBuilder` based on the metadata from the spring-data-rest `EntityPathResolver`.
    vierbergenlars committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    7d0ab60 View commit details
    Browse the repository at this point in the history