File tree 4 files changed +8
-6
lines changed
tests/Fixtures/TestBundle 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1628,7 +1628,7 @@ public function thereIsACustomMultipleIdentifierDummy()
1628
1628
{
1629
1629
$ dummy = $ this ->buildCustomMultipleIdentifierDummy ();
1630
1630
$ dummy ->setName ('Orwell ' );
1631
- $ dummy ->setFirstId ($ this -> isOrm () ? 1 : ' 1 ' );
1631
+ $ dummy ->setFirstId (1 );
1632
1632
$ dummy ->setSecondId (2 );
1633
1633
1634
1634
$ this ->manager ->persist ($ dummy );
Original file line number Diff line number Diff line change 26
26
class CustomMultipleIdentifierDummy
27
27
{
28
28
/**
29
- * @var string The custom identifier
29
+ * @var int The custom identifier
30
30
*
31
- * @ODM\Id(strategy="NONE", type="string ")
31
+ * @ODM\Id(strategy="NONE", type="integer ")
32
32
*/
33
33
private $ firstId ;
34
34
@@ -43,16 +43,16 @@ class CustomMultipleIdentifierDummy
43
43
/**
44
44
* @var string The dummy name
45
45
*
46
- * @ODM\Field(type="integer ")
46
+ * @ODM\Field(type="string ")
47
47
*/
48
48
private $ name ;
49
49
50
- public function getFirstId (): string
50
+ public function getFirstId (): int
51
51
{
52
52
return $ this ->firstId ;
53
53
}
54
54
55
- public function setFirstId (string $ firstId )
55
+ public function setFirstId (int $ firstId )
56
56
{
57
57
$ this ->firstId = $ firstId ;
58
58
}
Original file line number Diff line number Diff line change 21
21
/**
22
22
* @ApiResource(
23
23
* shortName="Product",
24
+ * attributes={"identified_by"="code"},
24
25
* normalizationContext={
25
26
* "groups"={"product_read"},
26
27
* },
Original file line number Diff line number Diff line change 21
21
/**
22
22
* @ApiResource(
23
23
* shortName="Taxon",
24
+ * attributes={"identified_by"="code"},
24
25
* normalizationContext={
25
26
* "groups"={"taxon_read"},
26
27
* },
You can’t perform that action at this time.
0 commit comments