Problem with metadata and OrderService.list in Medusa.js

99 Views Asked by At

My problem is that I want to search for orders that have the status set to "711" in the metadata, but it only finds the first 10 orders and does not find those above the 10th order.

this is my code:

  const order = await this.OrderSerivce.list(
      {
        metadata: {
          status:"711"
        },
      },
      {
        relations: ["billing_address"],
        order: {
          [sortField]: sortOrder,
        },
      }
    )

Search by metadata doesnt work corect

I want to sort order list by the metadata tag like status, external_id

0

There are 0 best solutions below