fix view csv and view json for relational stuff