3333 property: 'active ' ,
3434 nativeType: new BuiltinType (TypeIdentifier::BOOL ),
3535 ),
36+ 'nameConverted ' => new QueryParameter (
37+ filter: new BooleanFilter (),
38+ nativeType: new BuiltinType (TypeIdentifier::BOOL ),
39+ ),
40+ 'nameNotConverted ' => new QueryParameter (
41+ filter: new BooleanFilter (),
42+ nativeType: new BuiltinType (TypeIdentifier::BOOL ),
43+ ),
44+ 'aliasWithNameConverter ' => new QueryParameter (
45+ filter: new BooleanFilter (),
46+ property: 'nameConverted ' ,
47+ nativeType: new BuiltinType (TypeIdentifier::BOOL ),
48+ ),
49+ 'aliasWithoutNameConverter ' => new QueryParameter (
50+ filter: new BooleanFilter (),
51+ property: 'nameNotConverted ' ,
52+ nativeType: new BuiltinType (TypeIdentifier::BOOL ),
53+ ),
3654 ],
3755)]
3856#[ODM \Document]
3957class FilteredBooleanParameter
4058{
59+ #[ODM \Field(type: 'bool ' , nullable: true )]
60+ private ?bool $ nameConverted ;
61+
62+ #[ODM \Field(type: 'bool ' , nullable: true )]
63+ private ?bool $ nameNotConverted ;
64+
4165 public function __construct (
4266 #[ODM \Id(type: 'int ' , strategy: 'INCREMENT ' )]
4367 public ?int $ id = null ,
4468
4569 #[ODM \Field(type: 'bool ' , nullable: true )]
4670 public ?bool $ active = null ,
4771 ) {
72+ $ this ->nameConverted = $ this ->active ;
73+ $ this ->nameNotConverted = $ this ->active ;
4874 }
4975
5076 public function getId (): ?int
@@ -60,5 +86,7 @@ public function isActive(): bool
6086 public function setActive (?bool $ active ): void
6187 {
6288 $ this ->active = $ active ;
89+ $ this ->nameConverted = $ active ;
90+ $ this ->nameNotConverted = $ active ;
6391 }
6492}
0 commit comments