Foren

How to join multiple tables by multiple columns using DynamicQuery?

Kurt Xu, geändert vor 10 Jahren.

How to join multiple tables by multiple columns using DynamicQuery?

Junior Member Beiträge: 57 Beitrittsdatum: 02.02.13 Neueste Beiträge
I want to join multiple tables by multiple columns using DynamicQuery, but don't know how to do it. Say there are 2 tables, expandocolumn,expandovalue.

expandocolumn:
companyId
tableId

...

expandovalue:
valueId
companyId
tableId

...

I want to join expandocolumn to expandovalue by companyId and tableId using DynamicQuery API, is that possible to generate
expandocolumn.companyId=expandovalue.companyId and expandocolumn.tableId=expandovalue.tableId? Moreover, how to straight to get ExpandoValue and ExpandoColumn objects from the result?
Thanks
thumbnail
Rahul Pande, geändert vor 10 Jahren.

RE: How to join multiple tables by multiple columns using DynamicQuery?

Expert Beiträge: 310 Beitrittsdatum: 07.07.10 Neueste Beiträge
Hi Kurt,

Please have a look at this link.

HTH
Rahul
Kurt Xu, geändert vor 10 Jahren.

RE: How to join multiple tables by multiple columns using DynamicQuery?

Junior Member Beiträge: 57 Beitrittsdatum: 02.02.13 Neueste Beiträge
Rahul Pande:
Hi Kurt,

Please have a look at this link.

HTH
Rahul


Hello Rahul, I've researched the thread before, but it only talked about how to use just one column to join tables ,not two. And it uses subquery, not the shape of table1.a=table2.a .