Conversation
- Very simple command for simply generating the CND files for each document in the given bundle
There was a problem hiding this comment.
We can get a namespace URL from the bundle container extension, which is quite neat.
I also use the name of the extension as the alias, we could also use the bundle name (normally the difference between acme_basic_cms and AcmeBasicCmsBundle)
|
interesting, seems its not even that hard to build basic node type definitions. i think the logic to build cnd from metadata should go into a service. configured with a map of folders to look in and name prefix to use. that logic should live in phpcr-odm, not the bundle, as its not symfony specific. and i wonder if we should not generate one single file in the project, in the same principle as the orm doctrine:migrations:* command. depending on what i want to do, i might want the file there, or i could want it with my bundle, if the bundle is its own repository... migration is problematic, because its not possible to delete node types or remove properties from them. |
|
imho this is quite interesting though we then also need to work on better support for changing node types |
|
should this go into phpcr-odm rather than the bundle? |
|
I guess that would be the expected thing to do. |
This is just a quick sketch of a command to generate CND files (just namespaces and names, no properties / children definitions).
In general binding document classes to node types will enable much more efficient filtering and selecting (e.g.
SELECT * FROM MyBundle:Article WHERE title = "foobar")Obviously there is quite a large scope here, but just to follow on from what was the issue where we discussed this?
Next steps: