File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed
Fixtures/TestBundle/Document Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 3636#[ODM \Document]
3737class SecuredDummyCollection
3838{
39- #[ODM \Id(strategy: 'AUTO ' , type: 'integer ' )]
39+ #[ODM \Id(strategy: 'INCREMENT ' , type: 'int ' )]
4040 public ?int $ id = null ;
4141
4242 /**
Original file line number Diff line number Diff line change 3535#[ODM \Document]
3636class SecuredDummyCollectionParent
3737{
38- #[ODM \Id]
39- #[ODM \Field(type: 'id ' )]
40- public ?string $ id = null ;
38+ #[ODM \Id(strategy: 'INCREMENT ' , type: 'int ' )]
39+ public ?int $ id = null ;
4140
42- #[ODM \ReferenceOne(targetDocument: SecuredDummyCollection::class, inversedBy: 'parents ' )]
43- #[ODM \Field(nullable: false )]
44- public SecuredDummyCollection $ child ;
41+ #[ODM \ReferenceOne(targetDocument: SecuredDummyCollection::class)]
42+ public ?SecuredDummyCollection $ child = null ;
4543}
Original file line number Diff line number Diff line change 1515
1616use ApiPlatform \Symfony \Bundle \Test \ApiTestCase ;
1717use ApiPlatform \Tests \Fixtures \TestBundle \Document \SecuredDummy as DocumentSecuredDummy ;
18- use ApiPlatform \Tests \Fixtures \TestBundle \Entity \SecuredDummy ;
1918use ApiPlatform \Tests \Fixtures \TestBundle \Document \SecuredDummyCollection as DocumentSecuredDummyCollection ;
19+ use ApiPlatform \Tests \Fixtures \TestBundle \Entity \SecuredDummy ;
2020use ApiPlatform \Tests \Fixtures \TestBundle \Entity \SecuredDummyCollection ;
2121use ApiPlatform \Tests \Fixtures \TestBundle \Entity \SecuredDummyCollectionParent ;
2222use ApiPlatform \Tests \RecreateSchemaTrait ;
You can’t perform that action at this time.
0 commit comments