(CDB) Fix export bug with relations