title: How to read and filter entities-aggregates based on condition in Axon and after that change them
body: <p>I am new with Axon and maybe I missed something, but need help to understand.</p>
  <p>I have a simple food cart aggregate.</p>
  <p>Here is example:</p>
  <pre><code>@Aggregate
  class FoodCard {
  
      @AggregateIdentifier
      private lateinit var foodCardId: UUID
      private lateinit var selectedProduct: MutableMap&lt;UUID, Int&gt;
  
      constructor()
  
      @CommandHandler
      constructor(command: CreateFoodCartCommand) {
          AggregateLifecycle.apply(FoodCartCreateEvent(
              UUID.randomUUID()
          ))
      }
  
      @CommandHandler
      fun handle(command: SelectProductCommand) {
          AggregateLifecycle
              .apply(ProductSelectedEvent(foodCardId, command.productId, command.quantity))
      }
  
      @CommandHandler
      fun handle(command: DeleteFoodCartCommand) {
          AggregateLifecycle
              .apply(FoodCartDeleteEvent(foodCardId))
      }
  
      @CommandHandler
      fun handle(command: DeselectProductCommand) {
  
          val productId = command.productId
          if (!selectedProduct.containsKey(productId)) {
              throw ProductDeselectionException(&quot;ProductDeselectionException&quot;)
          }
          AggregateLifecycle
              .apply(ProductDeselectEvent(foodCardId, productId, command.quantity))
      }
  
      @EventSourcingHandler
      fun on(event: FoodCartCreateEvent) {
          foodCardId = event.foodCardId
          selectedProduct = mutableMapOf()
      }
  
      @EventSourcingHandler
      fun on(event: ProductSelectedEvent) {
          selectedProduct.merge(
                  event.productId,
                  event.quantity
          ) {a, b -&gt; a + b}
      }
  }
  </code></pre>
  <p>As ES I am using Axon Server.
  For FoodCard projector I am using JPA repository that connects to DB.</p>
  <p>I want to get all foodcards that contain special product (concrete UUID) and change quantity to -1 for all of them.</p>
  <p>I understood there are two types of actions -&gt; read and write</p>
  <p>So the question how to correctly implement this flow with Axon?</p>
  <p>Thanks</p>