I am trying to query from my table storage by using the Azure SDK for PHP.
My query looks like:
$tableRestProxy = ServicesBuilder::getInstance()->createTableService($this->connectionString);
$filter = "( PartitionKey eq '$id' )";
$options = new QueryEntitiesOptions();
$options->setFilter(Filter::applyQueryString($filter));
$result = $tableRestProxy->queryEntities('test', $options);
$entities = $result->getEntities();
$nextPartitionKey = $result->getNextPartitionKey();
$nextRowKey = $result->getNextRowKey();
while (!is_null($nextRowKey) && !is_null($nextPartitionKey) ) {
$options = new QueryEntitiesOptions();
$options->setNextPartitionKey($nextPartitionKey);
$options->setNextRowKey($nextRowKey);
$options->setFilter(Filter::applyQueryString($filter));
$result2 = $tableRestProxy->queryEntities("test", $options);
$newentities = $result2->getEntities();
$entities=array_merge($newentities, $entities);
}
The issue: When running into the while loop I always get the first 1000 back entities, with the same nextrowkey and nextpartitionkey for each query. Thus it creates an infinit loop.
What am I getting wrong with the continuation of a query? Any help is appreciated.