score:1

Accepted answer

the problem is that due to your outer joins, fork and map may be null. of course when they're null, you can't access their properties. you may need something like this:

status = (fork == null) ? null : fork.status,
mapid = (map == null) ? null : map.id 

Related Query

More Query from same tag