OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM Extends Opportunity entity with a collection called product interests

This topic contains 1 reply, has 2 voices, and was last updated by  Andrey Yatsenko 5 years, 11 months ago.

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

  • Creator
    Topic
  • #30882

    tony.qu
    Participant

    I’ve tried to add one-2-many relationship to the existing Opportunity entity. The collection is called product interest collection. I also defined some fields in ProductInterest entity.

    I also tried to extend Opportuniy entity by extending Oro\Bundle\SalesBundle\Entity\Opportunity.

    However, I cannot make it work. The system doesn’t detect the extended Opporunity entity at all. It always throw me the following error.

    [2018-05-08 10:04:55] request.CRITICAL: Uncaught PHP Exception Symfony\Component\PropertyAccess\Exception\NoSuchPropertyException: “Neither the property “items” nor one of the methods “getItems()”, “items()”, “isItems()”, “hasItems()”, “__get()” exist and have public access in class “Oro\Bundle\SalesBundle\Entity\Opportunity”.” at /var/www/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php line 486 {“exception”:”[object] (Symfony\\Component\\PropertyAccess\\Exception\\NoSuchPropertyException(code: 0): Neither the property \”items\” nor one of the methods \”getItems()\”, \”items()\”, \”isItems()\”, \”hasItems()\”, \”__get()\” exist and have public access in class \”Oro\\Bundle\\SalesBundle\\Entity\\Opportunity\”. at /var/www/vendor/symfony/symfony/src/Symfony/Component/PropertyAccess/PropertyAccessor.php:486)”} []

    Can anyone tell me what’s the correct way of extends Opporunity entity and a new sub collection to it?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The forum ‘OroCRM’ is closed to new topics and replies.

Back to top