на первую часть отвечу сам.
db
.select('*, out_.in.fname as fname, out_.in.lname as lname, out_.in.photo_50 as photo')
.from('Post')
.transform(function (record) {
record.fname = record.fname[0];
record.lname = record.lname[0];
record.photo = record.photo[0];
delete record._out;
return record;
})
.order('time desc')
.limit(10)
.all()
.then(function (results){