OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions How to use ExtendCache on custom entity

This topic contains 2 replies, has 2 voices, and was last updated by  Guillaume Deneux 5 years, 12 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
  • #34538

    Guillaume Deneux
    Participant

    I wish I could make a custom entity expandable by the cache system.
    Example: Oro \ Bundle \ UserBundle \ Entity \ User and Oro \ Bundle \ UserBundle \ Model \ ExtendUser.
    The goal is that the cache automatically generates the methods of the new attributes. These new attributes are created by migration scripts.

    Currently, it adds the column with the foreign key to the target table but it does not generate a cached class from my entity: tbd_gitlab_project ( and in a second time with method setter getter setCustomer() getCustomer() ) like the entity user :

    app/cache/dev/oro_entities/Extend/Entity/EX_OroUserBundle_User.orm.yml
    app/cache/dev/oro_entities/Extend/Entity/EX_OroUserBundle_User.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #34539

    msulima
    Moderator

    Hello, guillaume.deneux.

    Just tested your question. Next I added code of classes that will generate required by you “EX_TbdPipelinerBundle_Project.orm.yml” and “EX_TbdPipelinerBundle_Project.php” files.

    And as result:

    Also, the good (small) example of entity that you need is Scope entity from ScopeBundle: https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/ScopeBundle/Entity/Scope.php


    #34540

    Guillaume Deneux
    Participant

    It work’s !! Thanks for your help :)

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

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

Back to top