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

JPQLBuilder - criteria restriction on projection property is lost #620

Open
snimavat opened this issue Jan 16, 2023 · 0 comments
Open

JPQLBuilder - criteria restriction on projection property is lost #620

snimavat opened this issue Jan 16, 2023 · 0 comments

Comments

@snimavat
Copy link
Contributor

Fails to build proper query

def criteria = KitchenSink.query("sinkLink.createdByJobId": 1L)
            .groupBy("sinkLink.actDate as actDate")
            .groupBy("sinkLink.kind as kind")
            .groupBy("sinkLink.createdByJobId as createdByJobId")

Generates query

SELECT new map( kitchenSink.sinkLink.actDate as actDate,kitchenSink.sinkLink.kind as kind,kitchenSink.sinkLink.createdByJobId as createdByJobId ) FROM yakworks.testing.gorm.model.KitchenSink AS kitchenSink GROUP BY kitchenSink.sinkLink.actDate,kitchenSink.sinkLink.kind,kitchenSink.sinkLink.createdByJobId

There’s no having or where restriction for the criteria - sinkLink.createdByJobId = 1 (edited)

@basejump

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