['address']], denormalizationContext: ['groups' => ['address']] )] // #[Auditable] #[ORM\Entity(repositoryClass: OrganizationAddressPostalRepository::class)] #[OrganizationDefaultValue(fieldName: 'organization')] #[OpentalentAssert\OrganizationAddressPostal] class OrganizationAddressPostal { use CreatedOnAndByTrait; #[ORM\Id] #[ORM\Column] #[ORM\GeneratedValue] #[Groups('address')] private ?int $id = null; #[ORM\ManyToOne(inversedBy: 'organizationAddressPostals')] #[ORM\JoinColumn(nullable: false)] private Organization $organization; #[ORM\OneToOne(inversedBy: 'organizationAddressPostal', cascade: ['persist', 'remove'], orphanRemoval: true)] #[ORM\JoinColumn(nullable: false)] #[Assert\Valid] #[Groups('address')] private AddressPostal $addressPostal; #[ORM\Column(length: 50, enumType: AddressPostalOrganizationTypeEnum::class)] #[Groups('address')] private AddressPostalOrganizationTypeEnum $type; public function getId(): ?int { return $this->id; } public function getOrganization(): ?Organization { return $this->organization; } public function setOrganization(?Organization $organization): self { $this->organization = $organization; return $this; } public function getAddressPostal(): ?AddressPostal { return $this->addressPostal; } public function setAddressPostal(AddressPostal $addressPostal): self { $this->addressPostal = $addressPostal; return $this; } public function getType(): AddressPostalOrganizationTypeEnum { return $this->type; } public function setType(AddressPostalOrganizationTypeEnum $type): self { $this->type = $type; return $this; } }