TargetPerEntityHierarchy not created

Posts   
 
    
Meteor
User
Posts: 67
Joined: 06-Apr-2007
# Posted on: 07-Apr-2007 10:57:15   

LLBLGen Pro version 2.0.0.0, Trial version, SelfService Single class .Net 2.0 SqlServer 2000.

I have a table called 'Artists' which has a self-join on one of its fields called 'Label'. The 'Label' field can be 0, meaning that this artist does not belong to a label (these are recording artists, and the labels are record labels). The table has a relationship with itself defined as 'FK_Artists_Labels'. Each artist can only have one label, but a many artists can belong to one label. The records in the artists table which are actually labels, rather than artists, are differentiated by having a different value in the 'ArtistTypeID' column (either a 1 for artists, or a 2 for labels).

I have changed the names of the generated fields on relationships, so that there are two properties 'Label' and 'ArtistsInLabel' instead of 'artists' and 'artists_'.

When I generated the code, I thought that LLBLGen would create a subtype as in your Employee/Manager examples, but it hasn't.

Why would that be?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 08-Apr-2007 20:33:17   

At the moment, the hierarchy of type TargetPerEntity (and not targetperentityhierarchy wink ) is made between entities which have a pk-pk 1:1 relation. So pk-fk/uc 1:1 relations aren't supported for hierarchies.

Frans Bouma | Lead developer LLBLGen Pro