rsql-jpa-specification
rsql-jpa-specification copied to clipboard
Left vs Inner joins issue
I didn't find any follow-up of https://github.com/perplexhub/rsql-jpa-specification/pull/39. How should one handle this issue? I don't think that join hints are way to go, as whether to use left or right join depends on query parameters being used and whether a relationship is optional somewhere on the path.
i.e if we have relationship1.value==abc or relationship1.value=na=''
if relationship1 is not optional, there is no point in left join.
if relationship1 is optional it should be joined left.
if relationship1 is optional but there is no "or is null" it should be inner join.
there is also usecase mentioned in last comment of linked PR.
afaiu this would need some preprocessing, cause join type can't be changed on the fly, right?