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

Referencing of outer aliases in subqueries only works for one level #277

Closed
Mobe91 opened this issue Nov 10, 2016 · 0 comments
Closed

Referencing of outer aliases in subqueries only works for one level #277

Mobe91 opened this issue Nov 10, 2016 · 0 comments
Assignees
Milestone

Comments

@Mobe91
Copy link
Contributor

Mobe91 commented Nov 10, 2016

In the following query assignedUser.id.userId fails to be resolved:

.from(UserGroup.class, "internalUg")
                .innerJoin("internalUg.connectedUserGroup", "userGroup")
                .innerJoin("userGroup.assignedUsers", "assignedUser")
                .where("owner.id").eq(cocamId)
                .whereNotExists()
                    // https://hibernate.atlassian.net/browse/HHH-9027
                    .from(UserGroup.class, "workaround")
                    .select("1")
                    .where("workaround").eqExpression("internalUg")
                    .whereExists()
                        .from(UserGroupAssigned.class, "ass")
                        .select("1")
                        .where("ass.id.userGroupId").eqExpression("workaround.id")
                        .where("ass.id.userId").eqExpression("assignedUser.id.userId")
                    .end()
                .end()
@beikov beikov added this to the 1.2.0 milestone Nov 16, 2016
@Mobe91 Mobe91 self-assigned this Dec 19, 2016
@Mobe91 Mobe91 closed this as completed in dd53d9b Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants