Forums

Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Forums OroCommerce Dealing with extended entity in oro

This topic contains 4 replies, has 3 voices, and was last updated by Ayman Hussein Ayman Hussein 8 months, 2 weeks ago.

  • Creator
    Topic
  • #32617
    Ayman Hussein
    Ayman Hussein
    Participant

    Hi,

    I added new entity ‘manufacturers’ with these fields [id, name, desc and image], and I added some data to this table.

    The question now is: is there any Entity class created for this table or i have to create new one for this table in order to make some quires on it on my controller action.

    Thanks.


    arh922

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #32618

    igalayev
    Participant

    Hi,
    corresponding class should be created so you could use it as Extend\Entity\Manufacturers.
    This class resides in app/cache/{env}/oro_entities/Extend/Entity folder.

    Also consider to add entity with migration if it should be available from the start.
    There’s more info on that https://oroinc.com/doc/orocrm/2.3/book/entities

    #32619
    Ayman Hussein
    Ayman Hussein
    Participant

    Hi igalayev,

    The manufacture entity in dev is working well but in prod there is an issue, I got the following error:

    [2018-01-12 09:01:50] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Serializer\Exception\UnexpectedValueException: “Could not normalize object of type Extend\Entity\Manufacturer1, no supporting normalizer found.” at C:\xampp\htdocs\oro1.4\xng.xcaas.oro\vendor\symfony\symfony\src\Symfony\Component\Serializer\Serializer.php line 149 {“exception”:”[object] (Symfony\\Component\\Serializer\\Exception\\UnexpectedValueException(code: 0): Could not normalize object of type Extend\\Entity\\Manufacturer1, no supporting normalizer found. at C:\\xampp\\htdocs\\oro1.4\\xng.xcaas.oro\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Serializer\\Serializer.php:149)”} []

    Thanks.


    arh922

    #32620
    vseniuk
    vseniuk
    Participant

    Hello,
    Be careful when you create some entities in dev environment. Symfony has different cache directories for each environment. Try to clear prod environment caches, it should help.

    #32621
    Ayman Hussein
    Ayman Hussein
    Participant

    Hi vseniuk,

    Yes I did clear prod cache but it seems there is serialization for data in prod

    Below is my controller:


    arh922

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

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

Yes No
ssossossossossosso