I have a JPA select:
select c.name, f.id from Child c left join c.father
The expected result is:
Child 1 | 1
Child 2 | 2
Orphan | null
But I caught
Child 1 | 1
Child 2 | 2
Orphan | 0 // ZERO ?
I was able to workaround with this select
select c.name, case when (f.id is null) then null else f.id end from Child c left join c.father
There is some setting that I can set to stay way from the workaround?