tip model relation query