Skip to main content

Known Issues and Limitations

Selectable Bug in Counting matching() Results

There is a Doctrine bug involving ->matching($criteria)->count(). If the Criteria has a maxResults, then it will be disregarded and the count() will return the total number of items as if the maxResults were not set.

We work around this bug by fetching the items and counting them manually. This is suboptimal, but it works. If performance is critical, use a small proximity and a small page size. Or, use QueryBuilderAdapter instead.

Underlying QueryBuilder or Criteria With setFirstResult() and setMaxResults()

QueryBuilderAdapter and SelectableAdapter currently do not support underlying QueryBuilder or Criteria with setFirstResult() and setMaxResults(). If the underlying object has any these set, then the adapter will throw an exception.

SelectableAdapter does not Preserve Keys/Indexes

The problem is caused by this Doctrine bug:

Workaround: use indexBy parameter of the adapter. Example:

$adapter = new SelectableAdapter(
collection: $collection,
criteria: $criteria,
indexBy: 'id',
);