adding tests for relations + changes on get_model_from_table_ref