In llblgen’s documentation the example used to describe a hierarchy is Employee – Manager – BoardMember.
Assuming you had an existing Manager entity and you wanted to “promote” them to a BoardMember. How would you suggest adding the new BoardMember entity such that it extends an existing hierarchy of database records.
The basic goal is to just add a new BoardMember record that references the existing Manager record.
This is a hierarchy of type TargetPerEntity.
I’m using the 2.6 adapter with .net 3.5.
A solution to this was posted here
http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=16374
Basically you create another entity mapped to the BoardMember table and call it for example BoardMemberPromotion. You make this entity not be part of the hierarchy. Then you can create a new BoardMemberPromotion entity with an id that already exists in the Manager table and save it. Then, you can fetch a BoardMember entity with that manager id and it’ll work like you expect.
The only thing I don’t like about this is you now have to maintain any customizations to the BoardMember entity in two places. The solution is simple enough, it just seems like a hack. It would be nice if this operation of adding standalone subtype records was supported in code. If there’s another way to do this I’d love to know.