Skip to content

Allow custom mapping configuration like in Doctrine Bundle #46

@tbureck

Description

@tbureck

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions