File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4747use Doctrine \Common \Collections \Collection ;
4848use Doctrine \ORM \Mapping as ORM ;
4949use Symfony \Component \Serializer \Annotation \Groups ;
50+ use Symfony \Component \TypeInfo \Type \NullableType ;
51+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5052use Symfony \Component \Validator \Constraints as Assert ;
5153
5254/**
@@ -93,7 +95,7 @@ class AttachmentType extends AbstractStructuralDBElement
9395 #[ORM \ManyToOne(targetEntity: AttachmentType::class, inversedBy: 'children ' )]
9496 #[ORM \JoinColumn(name: 'parent_id ' )]
9597 #[Groups(['attachment_type:read ' , 'attachment_type:write ' ])]
96- #[ApiProperty(readableLink: true , writableLink: false )]
98+ #[ApiProperty(readableLink: true , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
9799 protected ?AbstractStructuralDBElement $ parent = null ;
98100
99101 /**
Original file line number Diff line number Diff line change 5050use Doctrine \Common \Collections \Collection ;
5151use Doctrine \ORM \Mapping as ORM ;
5252use Symfony \Component \Serializer \Annotation \Groups ;
53+ use Symfony \Component \TypeInfo \Type \NullableType ;
54+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5355use Symfony \Component \Validator \Constraints as Assert ;
5456
5557/**
@@ -98,7 +100,7 @@ class Category extends AbstractPartsContainingDBElement
98100 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
99101 #[ORM \JoinColumn(name: 'parent_id ' )]
100102 #[Groups(['category:read ' , 'category:write ' ])]
101- #[ApiProperty(readableLink: false , writableLink: false )]
103+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
102104 protected ?AbstractStructuralDBElement $ parent = null ;
103105
104106 #[Groups(['category:read ' , 'category:write ' ])]
Original file line number Diff line number Diff line change 4949use Doctrine \Common \Collections \Collection ;
5050use Doctrine \ORM \Mapping as ORM ;
5151use Symfony \Component \Serializer \Annotation \Groups ;
52+ use Symfony \Component \TypeInfo \Type \NullableType ;
53+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5254use Symfony \Component \Validator \Constraints as Assert ;
5355
5456/**
@@ -93,7 +95,7 @@ class Footprint extends AbstractPartsContainingDBElement
9395 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
9496 #[ORM \JoinColumn(name: 'parent_id ' )]
9597 #[Groups(['footprint:read ' , 'footprint:write ' ])]
96- #[ApiProperty(readableLink: false , writableLink: false )]
98+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
9799 protected ?AbstractStructuralDBElement $ parent = null ;
98100
99101 #[ORM \OneToMany(mappedBy: 'parent ' , targetEntity: self ::class)]
Original file line number Diff line number Diff line change 4848use Doctrine \Common \Collections \Collection ;
4949use Doctrine \ORM \Mapping as ORM ;
5050use Symfony \Component \Serializer \Annotation \Groups ;
51+ use Symfony \Component \TypeInfo \Type \NullableType ;
52+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5153use Symfony \Component \Validator \Constraints as Assert ;
5254
5355/**
@@ -92,7 +94,7 @@ class Manufacturer extends AbstractCompany
9294 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
9395 #[ORM \JoinColumn(name: 'parent_id ' )]
9496 #[Groups(['manufacturer:read ' , 'manufacturer:write ' ])]
95- #[ApiProperty(readableLink: false , writableLink: false )]
97+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
9698 protected ?AbstractStructuralDBElement $ parent = null ;
9799
98100 #[ORM \OneToMany(mappedBy: 'parent ' , targetEntity: self ::class)]
Original file line number Diff line number Diff line change 5050use Doctrine \ORM \Mapping as ORM ;
5151use Symfony \Bridge \Doctrine \Validator \Constraints \UniqueEntity ;
5252use Symfony \Component \Serializer \Annotation \Groups ;
53+ use Symfony \Component \TypeInfo \Type \NullableType ;
54+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5355use Symfony \Component \Validator \Constraints as Assert ;
5456use Symfony \Component \Validator \Constraints \Length ;
5557
@@ -130,7 +132,7 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
130132 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
131133 #[ORM \JoinColumn(name: 'parent_id ' )]
132134 #[Groups(['measurement_unit:read ' , 'measurement_unit:write ' ])]
133- #[ApiProperty(readableLink: false , writableLink: false )]
135+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
134136 protected ?AbstractStructuralDBElement $ parent = null ;
135137
136138 /**
Original file line number Diff line number Diff line change 4646use Doctrine \Common \Collections \Criteria ;
4747use Doctrine \ORM \Mapping as ORM ;
4848use Symfony \Component \Serializer \Annotation \Groups ;
49+ use Symfony \Component \TypeInfo \Type \NullableType ;
50+ use Symfony \Component \TypeInfo \Type \ObjectType ;
4951use Symfony \Component \Validator \Constraints as Assert ;
5052
5153/**
@@ -87,7 +89,7 @@ class PartCustomState extends AbstractPartsContainingDBElement
8789 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
8890 #[ORM \JoinColumn(name: 'parent_id ' )]
8991 #[Groups(['part_custom_state:read ' , 'part_custom_state:write ' ])]
90- #[ApiProperty(readableLink: false , writableLink: false )]
92+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
9193 protected ?AbstractStructuralDBElement $ parent = null ;
9294
9395 /**
Original file line number Diff line number Diff line change 5050use Doctrine \Common \Collections \Collection ;
5151use Doctrine \ORM \Mapping as ORM ;
5252use Symfony \Component \Serializer \Annotation \Groups ;
53+ use Symfony \Component \TypeInfo \Type \NullableType ;
54+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5355use Symfony \Component \Validator \Constraints as Assert ;
5456
5557/**
@@ -97,7 +99,7 @@ class StorageLocation extends AbstractPartsContainingDBElement
9799 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
98100 #[ORM \JoinColumn(name: 'parent_id ' )]
99101 #[Groups(['location:read ' , 'location:write ' ])]
100- #[ApiProperty(readableLink: false , writableLink: false )]
102+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
101103 protected ?AbstractStructuralDBElement $ parent = null ;
102104
103105 #[Groups(['location:read ' , 'location:write ' ])]
Original file line number Diff line number Diff line change 5353use Doctrine \Common \Collections \Collection ;
5454use Doctrine \ORM \Mapping as ORM ;
5555use Symfony \Component \Serializer \Annotation \Groups ;
56+ use Symfony \Component \TypeInfo \Type \NullableType ;
57+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5658use Symfony \Component \Validator \Constraints as Assert ;
5759
5860/**
@@ -99,7 +101,7 @@ class Supplier extends AbstractCompany
99101 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
100102 #[ORM \JoinColumn(name: 'parent_id ' )]
101103 #[Groups(['supplier:read ' , 'supplier:write ' ])]
102- #[ApiProperty(readableLink: false , writableLink: false )]
104+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
103105 protected ?AbstractStructuralDBElement $ parent = null ;
104106
105107 /**
Original file line number Diff line number Diff line change 5252use Doctrine \ORM \Mapping as ORM ;
5353use Symfony \Bridge \Doctrine \Validator \Constraints \UniqueEntity ;
5454use Symfony \Component \Serializer \Annotation \Groups ;
55+ use Symfony \Component \TypeInfo \Type \NullableType ;
56+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5557use Symfony \Component \Validator \Constraints as Assert ;
5658
5759/**
@@ -125,7 +127,7 @@ class Currency extends AbstractStructuralDBElement
125127 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
126128 #[ORM \JoinColumn(name: 'parent_id ' )]
127129 #[Groups(['currency:read ' , 'currency:write ' ])]
128- #[ApiProperty(readableLink: false , writableLink: false )]
130+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
129131 protected ?AbstractStructuralDBElement $ parent = null ;
130132
131133 /**
Original file line number Diff line number Diff line change 4949use Doctrine \ORM \Mapping as ORM ;
5050use InvalidArgumentException ;
5151use Symfony \Component \Serializer \Annotation \Groups ;
52+ use Symfony \Component \TypeInfo \Type \NullableType ;
53+ use Symfony \Component \TypeInfo \Type \ObjectType ;
5254use Symfony \Component \Validator \Constraints as Assert ;
5355use Symfony \Component \Validator \Context \ExecutionContextInterface ;
5456
@@ -95,7 +97,7 @@ class Project extends AbstractStructuralDBElement
9597 #[ORM \ManyToOne(targetEntity: self ::class, inversedBy: 'children ' )]
9698 #[ORM \JoinColumn(name: 'parent_id ' )]
9799 #[Groups(['project:read ' , 'project:write ' ])]
98- #[ApiProperty(readableLink: false , writableLink: false )]
100+ #[ApiProperty(readableLink: false , writableLink: false , nativeType: new NullableType ( new ObjectType ( self ::class)) )]
99101 protected ?AbstractStructuralDBElement $ parent = null ;
100102
101103 #[Groups(['project:read ' , 'project:write ' ])]
You can’t perform that action at this time.
0 commit comments