title: Convert ObjectId to String in Spring Data
body: <p>How can I reference two mongodb collections using spring data while the localField is of type ObjectId and foreignField is of type String?</p>
  
  <pre><code>ProjectionOperation convertId=Aggregation.project().and("_id").as("agentId");
  LookupOperation activityOperation = LookupOperation.newLookup().
          from("activity").
          localField("agentId").
          foreignField("agent_id").
          as("activities");
  Aggregation aggregation = Aggregation.newAggregation(convertId,activityOperation);
  return mongoTemplate.aggregate(aggregation, "agents", AgentDTO.class).getMappedResults()
  </code></pre>
  
  <p>However, this doesn't return any records because of the type issue. Is it possible to implement $toString or $convert in ProjectionOperation? or what other options are there?</p>