Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Override an Annotation Entity in Akeneo #20487

Open
jkrajpootbdn94 opened this issue Nov 15, 2024 · 0 comments
Open

How to Override an Annotation Entity in Akeneo #20487

jkrajpootbdn94 opened this issue Nov 15, 2024 · 0 comments

Comments

@jkrajpootbdn94
Copy link

jkrajpootbdn94 commented Nov 15, 2024

Akeneo Version: 3.x

Description: I am currently working on customizing Akeneo and would like to override an annotation-based entity in Akeneo. Specifically, I am trying to extend and modify the ConfigValue entity from Oro\Bundle\ConfigBundle.
Objective:
To replace the default ConfigValue entity with a custom version that adds additional functionality, without modifying the vendor files.

Steps Taken:

  1. Created a new entity class (ExtendedConfigValue) in my custom bundle that extends the original ConfigValue entity.

  2. Configured resolve_target_entities in my Resources/config/config.yml file to point from Oro\Bundle\ConfigBundle\Entity\ConfigValue to My\Bundle\Entity\ExtendedConfigValue.

doctrine:
    orm:
        resolve_target_entities:
            Oro\Bundle\ConfigBundle\Entity\ConfigValue: My\Bundle\Entity\ExtendedConfigValue

  1. Cleared the Symfony cache and ran doctrine:schema:update to ensure schema changes apply.

Issue:
Despite these steps, the application continues to reference the original ConfigValue entity, and I encounter errors indicating that it does not recognize the new configuration.

Questions:

  1. Is there any additional configuration required to override an annotation-based entity in Akeneo?
  2. Are there specific Akeneo or Symfony caching steps I might have missed that could prevent the override from taking effect?
  3. If anyone has successfully implemented an annotation-based entity override in Akeneo, could you share the steps or configurations that worked?

Thank you for any guidance you can provide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant