This topic contains 0 replies, has 1 voice, and was last updated by Geoffroy Cochard 8 years, 8 months ago.
- Topic
Hi,
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 ?Geoffroy
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.