Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Possible bug with CriteriaBuilder

This isn't a bug. When you pass true into your method it uses the following code
if (orderByAdvisorName) {

criteria.orderBy(cb.desc(from.get("advisor").get("advisorName")));
}

from.get("advisor") is causing an inner join as required by the spec.  You should reuse you left outer join instead:
criteria.orderBy(cb.desc(join.get("advisorName")));


Best regards
Chris

On May 20, 2017, at 6:22 PM, Jean Morissette <jean.morissette@xxxxxxxxx> wrote:

Hi dear EclipseLink developers,

I'm using EclipseLink (version 2.6.4) CriteriaBuilder API to build a left-outer-join with an order-by clause. However, it produces an inner-join query instead of a left-outer-join. 

You can take a look at this example to reproduce the problem: 


Hibernate produces the expected result.

Please, could you confirm it's effectively a bug, when it should be fixed and if a workaround exists in the meantime.

Thank you,
Jean


Back to the top