0 votes

Beta 3.2.0.1202.

I have bundle namespace to "\Main" and and several entities inside without specifying individual namespace on them. Now I added an entity to the bundle and namespace it to "Sub" (not "\Sub"). At the top of the entity's property inspector it shows up as "\Main\Sub\Entity" correctly.

When I now export to the pre-defined export path, the entity is missing. First I thought I may have to create the sub-folder "Sub" within the folder that "Main" points to, however even after this folder is created the entity is never output.

No error message or log is displayed and it's hard for me to confirm if the entity may have by error been exported elsewhere on the file system.

It appears the namespace property of the entity inside of a namespace is relative to the bundle namespace, which is my preference, however with no export output it will not work.

Now if I specify the full namespace in the entity's namespace property as "\Main\Sub" it will be generated inside the same folder as the output for "Main" however it will have a duplicate namespace because even though the namespace is prefixed with "\" it still is treated relative to the bundle's namespace and result in output but an unusable namespace on the Entity itself of "\Main\Sub\Main\Sub"

in Solved by (190 points)
recategorized by

I noticed your closed note here. So is there any problem with namespace handling or is it working correctly? Only to be sure if we should search for some bug or not ;-)

The export seems to work. So far I seem love that namespaces are finally working. We added a doctrine naming strategy to work around the duplicate table names issue.

There is one thing I am not sure if you consider it this is intentional or a bug. When you create associations between namespace entities now, the association field names are now '_main_sub_entityid' instead of just 'entityid'.

I'm glad you found a way how to get work also the duplicate table names.

Regarding the association field names, it's a bug and we're working on it. As soon as we fix all reported bugs we will release new beta.

2 Answers

0 votes

Oh, pretty weird ;-). Can you please send me ([email protected]) your project file so I can test it here? And which platform are you using (win/lin/mac)?

by Skipper developer (141k points)
0 votes

Only to be sure I made few more tests with namespaces. Here is my test project with showcase of all available situations:

Skipper namespace support

And this is the export result:

Skipper export result

Also it's possible to define absolute/relative namespace to region, so user can use following configuration:

enter image description here


The only problem which can occur in any of situation mentioned before is use-case when user sets module(bundle) property "filename-format" to "entity-name-only". In this situation all files are stored in single file with undetermined result. It's because in this situation only local-name is used for filename.

For situations where multiple entities with same local-name exist in single directory, it's necessary to use Doctrine2 recommended naming convention based on namespace+local-name (in Skipper used as default value "with-namespace").

Skipper module configuration

by Skipper developer (141k points)