A couple of basic questions

Posts   
 
    
jaschag
User
Posts: 79
Joined: 19-Apr-2006
# Posted on: 04-Oct-2006 13:27:45   

Using adapter, version 2:

Should a m:n link table have a surrogate pk or a composite one over the two fk's?

How does LLBLGen implement composite / aggregate relations? I.e. If an order is deleted, how should its orderlines be deleted - via manual code, automatic code, db referential integrity?

Thanks

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 04-Oct-2006 15:22:44   

Should a m:n link table have a surrogate pk or a composite one over the two fk's?

That's your call. Does not matter to LLBLGen Pro, as long as the PK-FK relations are defined.

How does LLBLGen implement composite / aggregate relations? I.e. If an order is deleted, how should its orderlines be deleted - via manual code, automatic code, db referential integrity?

All the above options are available: 1- db referential integrity on the DB level 2- via manual code on the BL level. 3- but in case of "automatic code", you will have to hook up some code in the DAL Level So I'd not call it automatic after all simple_smile (this may appear as the same as the second option, but I wanted to differentiate between them according to the level of implementation)