Community
Participate
Working Groups
Build Identifier: Follow the instructions below to reproduce this issue: - Create a new TS Project - Create a package called com.mycompany.foo - Create a new Entity under com.mycompany called 'foo' This will cause the icon for the 'foo' package to change to an Entity package (see attached screenshot). You can still drag and drop the Entity into foo package, but the icon changes to a package icon used in the Package Explorer!! Reproducible: Always
Created attachment 175014 [details] Screenshot
Internally Tigerstripe manages each artifact by it's FQN, where FQN is string representation of package name + artifact name. And internally there are only one artifact associated with a FQN. Therefore the existence of two artifacts with the same FQNs causes problems discribed above (ArtifactManager returns entity artifact instead of corresponding package artifact). I see two possible solutions to solve the problem: 1. Now you can't create a package if an artifact with the FQN is already exists. You receive "Type already exists" warning. So we can show the similar warning to prevent an artifact creation if a package with the FQN is already exists; 2. Change FQN structure, i.e. add additional information about element type. The 1. is more easy solution, when 2. is more correct but a lot of core parts will need to be refactored. What do you think about it?
Hey Anton, Solution #1 is sufficient. I don't think a lot of users will run into this case so we shouldn't spend all the efforts involved for #2. Instead we should prevent them from falling into the trap.
Created attachment 186618 [details] 320659 patch
Anton's patch applied.
Verified. Thanks!