Fix relations in the view to produce the complete json