Typed list breaks after creating hierarchy

Posts   
 
    
Posts: 33
Joined: 05-Feb-2005
# Posted on: 31-Aug-2006 23:28:21   

Hi guys,

I have table B which is a subtable of A. I created a typedList a while ago before the inheritance feature was available using the relation between these tables. Today, I decided to use the inheritance feature, and I created the hierarchy. When I regenerated the code, it won't compile. It seems the relation I was using is now changed because of the hierarchy, but the typed list is till using the old name. If I manually change the bad relation to RelationToSuperTypeAEntity it will compile, but I need to get this set properly in the desinger so I don't have to do it every time I regenerate. Any suggestions?

thanks, Jason

ps. I'm using 1.0.2005.1 released July 6th

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39943
Joined: 17-Aug-2003
# Posted on: 01-Sep-2006 07:35:07   

Your typedlist contains a relation which is now used for the hierarchy? (I.e. a 1:1 PK-PK relation) ?

Frans Bouma | Lead developer LLBLGen Pro
Posts: 33
Joined: 05-Feb-2005
# Posted on: 01-Sep-2006 17:03:24   

Thats correct

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39943
Joined: 17-Aug-2003
# Posted on: 01-Sep-2006 17:52:31   

Jason wrote:

Thats correct

I indeed think that's a bug. To correct it in the current typedlist, select an alternative relation to base the typed list on.

I'll see if I can fix it in the code base as it's likely also present in v2.0

Frans Bouma | Lead developer LLBLGen Pro
Posts: 33
Joined: 05-Feb-2005
# Posted on: 01-Sep-2006 20:17:48   

I had the same idea (selecting anoter relation to use) but when I click the relation I want to change, the dropdown for "Select Alternative" is completely blank (ie there is not even one currently selected). I tried removing the base entity and readding it, but its greyed out, even though the subEntity is included. I then tried removing the subEntity and readding it which worked, but doing this still didn't allow the base entity to be added.

Jason

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39943
Joined: 17-Aug-2003
# Posted on: 01-Sep-2006 20:32:09   

Well, there has to be a relation left other than the relation used for the hierarchy, to connect an entity A with an entity B, both in the typedlist. Is that the case?

Frans Bouma | Lead developer LLBLGen Pro
Posts: 33
Joined: 05-Feb-2005
# Posted on: 01-Sep-2006 21:29:28   

Thats the part that seems to be broken. Before I created the hierarchy, there was a relation "A" that connected the two. Now with the hierarchy, the dropdown is blank, and the generated code for the typed list still uses the old relation "A" which doesn't exist in the Relation class for the entity.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39943
Joined: 17-Aug-2003
# Posted on: 01-Sep-2006 23:33:32   

Though is there a relation between B and A which isn't the one used for the hierarchy? The hierarchy uses the relation between the PK's of B and A (the 1:1 relation). If not, it's not possible to add both to the typedlist for obvious reasons.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 33
Joined: 05-Feb-2005
# Posted on: 02-Sep-2006 00:14:18   

Though is there a relation between B and A which isn't the one used for the hierarchy?

No, there is only the 1:1 relationship between the two tables.

If not, it's not possible to add both to the typedlist for obvious reasons.

Maybe I'm misunderstanding how the typedLists work. In my case I'm working with a base class "Transaction" which has a subtype "LeadPurchaseTransaction". I want the typedList to include fields from both tables. If I add "LeadPurchaseTransaction", will I automatically be able to use fields from the "Transaction" table, or do I have to include a relation to that manually?

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 02-Sep-2006 03:23:30   

It may be a bit of a misunderstanding. LeadPurchaseTransaction cannot exist without Transaction. So if you ever have a LeadPurchaseTransaction entity you will be modifying the values in both tables due the the inheritance in LLBLGen.