title: How to select specifics fields form HybridRelations in laravel?
body: <p>Hi i have one model "Trip" with postgress connection and another model "ComponentValue" with mongodb connection</p>
  
  <p>i have created a query to retrieve trips with component value like this</p>
  
  <pre><code>public function getVehicleTrips($vehicleID, $filters = null, $withPaginate = true)
  {
      try {
  
          $query = Trip::query()
              -&gt;where('vehicle_id', '=', $vehicleID)
              -&gt;with('heightsDamagedComponentValue')
              -&gt;with('lowestDamagedComponentValue')
              -&gt;with('heightsDamagedComponentValue.componentType')
              -&gt;with('lowestDamagedComponentValue.componentType');
  
  
          $query = $this-&gt;applyTripsDatesFilters($query, $filters);
  
  
  
          if ($withPaginate) {
              $query = $query-&gt;paginate(Helpers::getKeyValue($filters, 'limit', 10));
  
          }
  
          $query = $query-&gt;sortByDesc('heightsDamagedComponentValue.damage')-&gt;values();
  
          $result = $query;
  
          return $result;
  
      } catch (\Exception $e) {
  
          return false;
      }
  }
  </code></pre>
  
  <p>the data are retrieved but the heightsDamagedComponentValue has some fileds that i don't want to include them in the result, even i don't want to be included in the query selection </p>
  
  <p>so how i can specific some fields to retrieved from the mongo relationship heightsDamagedComponentValue ?</p>
  
  <p>i already tried this <a href="https://stackoverflow.com/questions/55009700/how-to-select-particular-column-from-relationship-collection-table-in-laravel-mo">solution</a> and tried to add </p>
  
  <pre><code> protected $guarded = ['id', 'data'];
  </code></pre>
  
  <p>to the <code>ComponentValue</code> model but it didn't work also,</p>
  
  <p>the heightsDamagedComponentValue method is </p>
  
  <pre><code>public function heightsDamagedComponentValue()
  {
      return $this-&gt;hasOne(ComponentValue::class)-&gt;orderBy('damage', 'desc');
  }
  </code></pre>
  
  <p>please any help and many thanks in advance</p>