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 36
36
#[ODM \Document]
37
37
class SecuredDummyCollection
38
38
{
39
- #[ODM \Id(strategy: 'AUTO ' , type: 'integer ' )]
39
+ #[ODM \Id(strategy: 'INCREMENT ' , type: 'int ' )]
40
40
public ?int $ id = null ;
41
41
42
42
/**
Original file line number Diff line number Diff line change 35
35
#[ODM \Document]
36
36
class SecuredDummyCollectionParent
37
37
{
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 ;
41
40
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 ;
45
43
}
Original file line number Diff line number Diff line change 15
15
16
16
use ApiPlatform \Symfony \Bundle \Test \ApiTestCase ;
17
17
use ApiPlatform \Tests \Fixtures \TestBundle \Document \SecuredDummy as DocumentSecuredDummy ;
18
- use ApiPlatform \Tests \Fixtures \TestBundle \Entity \SecuredDummy ;
19
18
use ApiPlatform \Tests \Fixtures \TestBundle \Document \SecuredDummyCollection as DocumentSecuredDummyCollection ;
19
+ use ApiPlatform \Tests \Fixtures \TestBundle \Entity \SecuredDummy ;
20
20
use ApiPlatform \Tests \Fixtures \TestBundle \Entity \SecuredDummyCollection ;
21
21
use ApiPlatform \Tests \Fixtures \TestBundle \Entity \SecuredDummyCollectionParent ;
22
22
use ApiPlatform \Tests \RecreateSchemaTrait ;
You can’t perform that action at this time.
0 commit comments