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

MangoCriteria projection is lost in certain scenario #609

Open
snimavat opened this issue Dec 23, 2022 · 0 comments
Open

MangoCriteria projection is lost in certain scenario #609

snimavat opened this issue Dec 23, 2022 · 0 comments

Comments

@snimavat
Copy link
Contributor

snimavat commented Dec 23, 2022

In certain scenario, where additional projections are added through query.build {}
Some of the projection is lost.

eg

        def query = Org.query {
            createAlias('calc', 'calc')
            createAlias('contact', 'contact')
            //putting projections here would pass.
        }

        //fails only when min used with groupBy in query.build {}
        query = query.build {
            projections {
                groupBy("orgTypeId")
                min("calc.totalDue") //this should result in a key calc_totalDue in the result map
            }
        }

See the test that reveals the issue : here

Notice the projections in below screenshot

Screenshot 2022-12-23 at 7 54 47 PM


Scenario 2

When criteria restriction is added on an alias instead of a property
this test reveals the issue : 572920e

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

1 participant