OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Use AddressBundle elements with a custom RegularEntity

This topic contains 0 replies, has 1 voice, and was last updated by  Geoffroy Cochard 5 years ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #33924

    Geoffroy Cochard

    I would like to add phone, address, email capabilities to many custom RegularEntity and store all in same table.

    My choice for the moment has to be to create EntityContactBundle with this below entities

    Namespace ****\****\Entity\Phone
    use Oro\Bundle\AddressBundle\Entity\AbstractPhone;
    * @ORM\Entity
    * @ORM\Table("co_phone", indexes={
    * @ORM\Index(name="primary_phone_idx", columns={"phone", "is_primary"}),
    * @ORM\Index(name="phone_idx", columns={"phone"})
    * })
    class Phone extends AbsractPhone

    Namespace ****\****\Entity\Email
    use Oro\Bundle\EmailBundle\Entity\EmailInterface;
    use Oro\Bundle\AddressBundle\Entity\AbstractEmail;
    * @ORM\Entity
    * @ORM\Table("co_email", indexes={
    * @ORM\Index(name="primary_email_idx", columns={"email", "is_primary"})
    * })
    class Email AbstractEmail implements EmailInterface

    And add OneToMany relation from my CustomEntity to these Email, Phone entities.

    Is the right way ?
    Must should i have to extend OroAddressBundle ?


The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No