Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Avoid populating Collections with null values in GroupBy projections #259
A query with a LEFT JOIN and GroupBy.list GroupExpression produces lists with size 1 and a NULL element inside.
Following the documentation example with Cat and Kitten there would be the following class
And the query would be like
This works OK when a cat has kittens, but if a cat has no kittens the kitten list is a List with size 1 and a single null element inside.
Maybe this is not the most coherent behavoir, as a LEFT JOIN in JPA would set the kittens field as null.
The issue could be worked-around by reimplementing GList with the following modifications:
I suppose the GSet and GMap classes have the same behavoir.