0 votes

I'm getting this error why trying to use an Entity name again:

Model already contains Entity with name [Course]

Where XX is the name of the Entity I'm trying to use.
These entities are not in the same bundle, but share the same name.

How can I get this done in Skipper?

in Solved by (170 points)

1 Answer

0 votes
Best answer

Currently this is not supported by Skipper, because namespaces are not core attributes and cannot be used for element identification in the Skipper visual model (only the element names are). The change required for the identification of entities by names and namespaces will require complete rewrite of the application logic. Because of this, implementation is not on our short term plan at this moment.

Can you please provide me more detailed example of your intended use? Perhaps we can put together some workaround, but at the moment renaming the entities seems to be the easiest and most straightforward solution.

by Skipper developer (74.8k points)
selected by

Hi Martin,

We have a CourseBundle inside our application where customers can create standardized courses (with a name and description).

Thus we've named an entity Course inside this bundle creating the namespace CourseBundle/Course

In our StaffBundle we also define courses where a customer can select which course a staff member has followed and give it an expire date and inputs the results of this followed course. We would like to name this entity Course as well creating StaffBundle/Course to get these results

Thank you very much for the description. I discussed this with colleagues and at this moment no workaround will be possible. I'm sorry I cannot help you to implement this solution in Skipper.

Usually, using unique entity names is the safest practice, while Doctrine does differentiate between namespaces without problem, this may cause confusion. Having duplicate names is commonly avoided by just renaming the entity, or merging the two tables in question. This can be managed even in larger legacy projects, and usually saves time in the future.