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

Select alias expressions should be resolved when copying a query or when switching the select clause #725

Closed
beikov opened this issue Jan 23, 2019 · 0 comments · Fixed by #721

Comments

@beikov
Copy link
Member

commented Jan 23, 2019

Description

When copying a query, we copy expressions as they are. If a select alias is referenced in the query, we can only resolve it properly when the select clause stays the same. IMO, we should either resolve aliases immediately or at the very least when we replace the select clause.
This happens when adding a sorter for an entity view attribute that also contains a SUBSELECT fetched attribute. Not sure yet how to handle this. Either we try to avoid the issue by not copying over the order by clause or we try to somehow allow resetting the order by clause. Another, more or less orthogonal option would be to try to resolve the aliases.

This is kind of related to #370

Expected behavior

Actual behavior

Steps to reproduce

Environment

Version: 1.3.0
JPA-Provider: -
DBMS: -
Application Server: -

@beikov beikov added this to the 1.4.0 milestone Jan 23, 2019

@beikov beikov self-assigned this Jan 23, 2019

beikov added a commit to beikov/blaze-persistence that referenced this issue Jan 23, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now
beikov added a commit to beikov/blaze-persistence that referenced this issue Jan 23, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now
beikov added a commit to beikov/blaze-persistence that referenced this issue Jan 24, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now
beikov added a commit to beikov/blaze-persistence that referenced this issue Jan 28, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now
beikov added a commit to beikov/blaze-persistence that referenced this issue Jan 29, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now
beikov added a commit to beikov/blaze-persistence that referenced this issue Feb 10, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now
beikov added a commit to beikov/blaze-persistence that referenced this issue Feb 19, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now
beikov added a commit to beikov/blaze-persistence that referenced this issue Feb 19, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now

@beikov beikov closed this in #721 Feb 25, 2019

beikov added a commit that referenced this issue Feb 25, 2019
[#725] Test and fix for issues with stripped off select items in copi…
…ed queries. Inlining select alias expressions now
beikov added a commit to beikov/blaze-persistence that referenced this issue Feb 25, 2019
[Blazebit#725] Test and fix for issues with stripped off select items…
… in copied queries. Inlining select alias expressions now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.