Filtering Entities out of the Target-per-Entity hierarchies

Posts   
 
    
greenstone
User
Posts: 132
Joined: 20-Jun-2007
# Posted on: 04-Aug-2008 14:00:29   

In the LLBLGen Pro development designer UI, can I annotate, or otherwise flag Entities (under Llblgen "adapter" mode) to not become hierarchy members when running the (right mouse menu) Entities/"Contruct target-per-Entity hierarchies" command?

A sample case (maybe somewhat imperfect from a practical view) I've made is like this: Car (root of target-per-Entity hierarchy) Ford (assume 1:1 with Car and member of target-per-Entity hierarchy) Focus(assume 1:1 with Ford and member of target-per-Entity hierarchy) SteeringWheel(assume 1:1 with Focus and NOT member of target-per-Entity hierarchy) RearViewMirror(assume 1:1 with Focus and NOT member of target-per-Entity hierarchy) GearShiftHandle(assume 1:1 with Focus and NOT member of target-per-Entity hierarchy)

For this sample case, when I run "Construct target-per-Entity hierarcharchies", all six tables will become part of the hiearchy. I can then go in and (right mouse menu) "Remove from Hierarchy" each the SteeringWheel, ReviewViewMirror and GearShiftHandle. This does a pretty good job to suit my purpose. But is there a way to default SteeringWheel, RearViewMirror, and GearShiftHandle to not be brought into the target-per-Entity hierarchy in the first place?

Thanks!

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 04-Aug-2008 17:13:42   

I don't see much of a difference.

In both cases you'd have to go to each entity and perform some action to exclude it or remove it from the hierarchy.

greenstone
User
Posts: 132
Joined: 20-Jun-2007
# Posted on: 05-Aug-2008 04:32:57   

Hi Walaa,

Yes, I see your point: The database metadata is the source of the Llblgen mappings. Might there be anything I can set in the database on the constraints to differentiate a target-per-Entity 1:1 mapping from a non target-per-Entity 1:1 mapping?

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 05-Aug-2008 17:14:29   

None, unless you want to use a separate field on the child entity as the FK (other than its own PK), and create a unique constraint on this FK if you want to maintain the 1:1 relation.

greenstone
User
Posts: 132
Joined: 20-Jun-2007
# Posted on: 06-Aug-2008 04:33:21   

Yes, your suggestion works perfectly. Thanks!