Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Kurt Xu
How to join multiple tables by multiple columns using DynamicQuery?
1. Mai 2013 06:15
Antwort

Kurt Xu

Rang: Junior Member

Nachrichten: 57

Eintrittsdatum: 2. Februar 2013

Neue 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
Rahul Pande
RE: How to join multiple tables by multiple columns using DynamicQuery?
2. Mai 2013 00:26
Antwort

Rahul Pande

Rang: Expert

Nachrichten: 308

Eintrittsdatum: 6. Juli 2010

Neue Beiträge

Hi Kurt,

Please have a look at this link.

HTH
Rahul
Kurt Xu
RE: How to join multiple tables by multiple columns using DynamicQuery?
2. Mai 2013 09:34
Antwort

Kurt Xu

Rang: Junior Member

Nachrichten: 57

Eintrittsdatum: 2. Februar 2013

Neue 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 .