protected Relation buildRelation() {
Database db = belongsToClassMap == null ? database : belongsToClassMap.database();
RelationBuilder builder = relationBuilder(db.connectedDB());
builder.addProjection(contentDownloadColumn);
for (ProjectionSpec projection: getMediaTypeValueMaker().projectionSpecs()) {
builder.addProjection(projection);
}
if (belongsToClassMap != null) {
builder.addOther(belongsToClassMap.relationBuilder(db.connectedDB()));
}
return builder.buildRelation();