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?