Cannot remove an entity from Hierarchy...

Posts   
 
    
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 06-Mar-2007 19:26:54   

I selected 'Construct Target-Per-Entity' hierarchy from the Entities node. Designer created all hierachies.

I need to remove some of the created heirarchies. The designer will not let me.

For any Target Per Entity hierarchies I have defined, when I right click the root entity or any subtypes, the options "Destroy Hierarchy" and "Remove from Hierarchy" are not available.

I updated my designer to the 2-14-07 build, still same result.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 06-Mar-2007 20:39:50   

PLease either attach the project or mail it to support AT llblgen.com so I can debug it with the project.

Though be sure that all entities in the hierarchy starting with the one on which you open the context menu aren't in a typedlist.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 06-Mar-2007 20:47:07   

It is in your inbox!

Thanks for the quick response!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 06-Mar-2007 20:59:48   

Got it simple_smile

THough I think it's the typedlists. The thing is that an entity which is in a hierarchy AND in a typedlist can't automatically be removed from the hierarchy because the relations used in the typedlist are probably inherited.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 06-Mar-2007 21:10:05   

Ugh...Here is what happened.

I actually added an inheritance structure, I did the automatic 'construct target per entity' it added this (and other) entities to a hierachy (and I was not using them in a hierarchal fashion before). So, I updated all typed lists and items to work and was all very happy.

UNTIL, I tried to .......see complete description....... http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=9232

So, now I am looking at having to undo the typed lists, break the hierarchy, redo the typed lists (some of which I no longer needed at all thanks to the hierarchy) and change all the code back.....

I may opt for the 'extra entity' workaround, which I am not fond of but I think it beats doing the above.... disappointed

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 07-Mar-2007 10:11:23   

It's indeed the typedlists, it checks if an entity is in the typedlist, if so it refuses to destroy the hierarchy.

the thing is that it can't reconstruct the typedlists if the entity hierarchy should be allowed to be destroyed simply because the nature of the typedlist changes, so this always requires the developer to make sure the typedlist STILL represents what's expected.

What I can do though is refuse to BUILD the hierarchies automatically for entities which are in a typedlist already. That would make life easier. if the developer then manually creates the hierarchy, a warning could be shown. Is that what you are requesting in your feature request thread?

Frans Bouma | Lead developer LLBLGen Pro
Posts: 1268
Joined: 10-Mar-2006
# Posted on: 07-Mar-2007 15:31:45   

What I can do though is refuse to BUILD the hierarchies automatically for entities which are in a typedlist already. That would make life easier. if the developer then manually creates the hierarchy, a warning could be shown. Is that what you are requesting in your feature request thread?

Not what I am requesting in the other thread. However, if you refused to build the hierarchies for entities in a typed list - a warning would be nice to say why they were skipped. On the manual creation - a warning would be good. Also, if you were to 'enable' the delete hierarchy and then when I tried to do it throw an error of 'cannot destroy hierarchy, because entities are in a typed list' - that would solve it too.....

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39927
Joined: 17-Aug-2003
# Posted on: 08-Mar-2007 12:31:32   

Ok, I'll make it more intuitive and less cumbersome.

Frans Bouma | Lead developer LLBLGen Pro