fixed relation tests
added 'distinct' query filter
fixed unwanted deletion of belongs-to relations in Storage->save()