apache / apache/grails-core

Ordering an association property overrides the join type

Open
#14,543 0 comments 0 reactions 0 assignees View on GitHub
relates-to: gorm
Dominant language
Groovy
Stars
2.9k
Forks
975
Avg merge
1d 22h
Merged PRs (30d)
92

Description

```
new DetachedCriteria(Book).build {
author {
order("name")
}
join("author", JoinType.LEFT)
}

```
results in the author being joined with an inner join

Contributor guide

Open the contributing guide

Research direction

Start with the DetachedCriteria example and trace how ordering the author association affects join construction. Reproduce the case, then verify that join("author", JoinType.LEFT) still produces a LEFT join when author ordering is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.