V3 Relationships editor

Posts   
 
    
El Barto
User
Posts: 64
Joined: 09-Nov-2006
# Posted on: 22-Jun-2010 16:01:49   

I use LLBLGen for several years now. I'm verry happy with it, so I didn't hesitate to buy V3. I just started using it and hit the first obstacle. I'm using LLBLGen on an existing database. I'm not able to change the database. I use 2 tables; an order table and a delivery address table.

The delivery address table has a primary key of 3 columns: CustomerID, AddressID and AddressType. The order table only has the CustomerID and AddressID collumns. So I wanted to create a custom relation between the 2 tables using only the CustomerID and AddressID collumn, but the designer won't let me. I have to either add an extra field to the order table or I have to remove the AddressType from the primary key. I don't want to do either of them. In version V2.6 I could make any relation I wanted, where can I do this in V3

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 22-Jun-2010 16:46:57   

Which side is the FK side, Order or DeliveryAddress? I think 'Order' ?

The FK side has the same number of fields as the PK side. I'm very surprised you could create that relationship in v2, as it would have a hard time generating the relation code because there's no matching FK field for 'AddressType in 'Order' (and the custom relationship editor requires for every PK field an Fk field to be specified in v2.x) It would otherwise be a m:n without an intermediate entity, something we don't support (nor did we do that in v2). To be a 1:n/m:1 relationship, the FK side has to have all PK fields, in v2 and in v3.

If you can't change the db, be sure to set the '...FollowDB...' settings to false in project properties.

Frans Bouma | Lead developer LLBLGen Pro
El Barto
User
Posts: 64
Joined: 09-Nov-2006
# Posted on: 22-Jun-2010 17:11:42   

I've recreated the project in V2.6 and indeed, you're right. In V2.6 this is also not supported. I'll find a solution, I just have to search how in some previous projects. Anyway, thanks for the the tip with "FollowDB"