changing relationship from tablename to class name