// you must join relation first User.query() .join('colaborator_data', 'colaborator_data.doctor_id', '=', 'users.id')