views:

116

answers:

1

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.

+1  A: 

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.

jayrdub
jayrdub
The link for the reason is broken :(
Paulo Manuel Santos
Strange, maybe he changed his mind and deleted the thread. I couldn't find it.
jayrdub
Thread is still there.
Frans Bouma
@Frans - where did the thread linked to in the first comment go?
jayrdub
That's also still there, but it's in the feature requests forum, which is only visible when you're logged in, I think that's why you're getting the bounce back to the default page.
Frans Bouma