ebean-orm / ebean-orm/ebean

Sorting on a ManyToMany relationship

Open
#3,419 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.5k
Forks
267
Avg merge
3d 20h
Merged PRs (30d)
5

Description

Expected behavior

Querying a bean with a Many to Many relationship and sorting on that relationship should not duplicate returned list. I am not sure if sorting by many to many relationship is a supported scenario.

Actual behavior

Query returns duplicate beans.

Steps to reproduce

Please see attached failing PR https://github.com/ebean-orm/ebean/pull/3418

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the failing pull request linked as #3418 and its reproduction for sorting a bean through a ManyToMany relationship. Trace the query handling involved and verify the fix by confirming that sorting returns each bean only once without breaking the relationship query.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.