Skip to content

Commit 434f091

Browse files
committed
mongodb
1 parent f5cf934 commit 434f091

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/Fixtures/TestBundle/Document/ParameterOnProperties.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313

1414
namespace ApiPlatform\Tests\Fixtures\TestBundle\Document;
1515

16+
use ApiPlatform\Doctrine\Odm\Filter\PartialSearchFilter;
1617
use ApiPlatform\Metadata\ApiResource;
1718
use ApiPlatform\Metadata\Get;
1819
use ApiPlatform\Metadata\GetCollection;
20+
use ApiPlatform\Metadata\QueryParameter;
1921
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
2022

2123
#[ODM\Document]
@@ -32,6 +34,7 @@ class ParameterOnProperties
3234
private ?string $id = null;
3335

3436
#[ODM\Field(type: 'string')]
37+
#[QueryParameter(key: 'qname', filter: new PartialSearchFilter())]
3538
private string $name = '';
3639

3740
#[ODM\Field(type: 'string', nullable: true)]

0 commit comments

Comments
 (0)