Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> How to join to same table twice
 

Pages: 1
LLBLGen Pro Runtime Framework
How to join to same table twice
Page:1/1 

  Print all messages in this thread  
Poster Message
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 23-Sep-2017 18:49:03.  
Code:
bucket.Relations.Add(GuestEntity.Relations.AccountEntityUsingGuestAccountId, "guestAccount");
bucket.Relations.Add(GuestEntity.Relations.AccountEntityUsingAccountId, "mainAccount");
bucket.Relations.Add(AccountEntity.Relations.VwEventAccountEntityUsingAccountId);


The generated query doesn't include the second join so it tries to join to VwEventAccount using guestAccount's AccountId.

How do I make it use mainAccount's accountId to do the third join?
  Top
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 23-Sep-2017 19:23:04.  
This worked...

Code:
bucket.Relations.Add(GuestEntity.Relations.AccountEntityUsingAccountId, "mainAccount");

var rel = AccountEntity.Relations.VwEventAccountEntityUsingAccountId;
rel.SetAliases("mainAccount", string.Empty);

bucket.Relations.Add(vwEventAccountEntityUsingAccountId);


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.