LLBL doesn't save link table rows??

Posts   
 
    
Posts: 48
Joined: 14-Oct-2008
# Posted on: 14-Nov-2008 16:18:19   

I have an object ('Employee') that has an m:n relationship to another object ('Address') via a link table that has FKs to both employee and Address. So in my Employee object, I have an 'Addresses' collection. When I create a new AddressEntity and add it to Employee.Addresses and then call Employee.Save(true), it saves both the employee and the address, but doesn't put anything in the link table.

I presume this is by design, but is there something that I can do to make this automatic? Or do I have to maintain the link table manually?

(FYI, this probably isn't the best example, because I've just decided that I will put an FK into Address pointing back to employee, but I do have other situations where the above description is relevant.)

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 14-Nov-2008 19:18:35   

At this link look for "How I do..." -> create a m:n relation between two entity objects. This is the way you have to do that.

David Elizondo | LLBLGen Support Team