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

Allow custom mapping configuration like in Doctrine Bundle #46

Open
tbureck opened this issue Feb 27, 2018 · 0 comments
Open

Allow custom mapping configuration like in Doctrine Bundle #46

tbureck opened this issue Feb 27, 2018 · 0 comments

Comments

@tbureck
Copy link

tbureck commented Feb 27, 2018

Currently, when you use neo4j-bundle you can only use annotation mapping because it's the EntityManager's default way to load mapping information. As XML mapping is basically possible, I think this bundle should support defining custom mapping information as well.

So I'd like to suggest this feature, which would enable to configure the mapping information via the configuration file, just like Doctrine does it. In doctrine-bundle you can specify the mappings to be used by an entity manager, by specifying them in the configuration like this:

doctrine:
  orm:
    entity_managers:
      default:
        [...]
        mappings:
          mapping_name:
            mapping:              true
            type:                 ~
            dir:                  ~
            alias:                ~
            prefix:               ~
            is_bundle:            ~

My suggestion is to implement the same structure to neo4j-bundle. Omitting the mappings configuration should lead to using annotations, just like before, in order to keep BC.

Notice: @ikwattro mentioned, XML mapping might need some updating on graphaware/neo4j-php-ogm's side.

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