hi,
I wonder if there is a special syntax for defining queries with outer joins in seam.
I am trying this query defined in my components.xml file
<framework:entity-query name="innerJoinQueryList" ejbql="select instruFund, instru, cash FROM InstrumentFund instruFund left outer JOIN Instrument instru ON instruFund.id.idAsset = instru.internalOptionNumber left outer JOIN Cash cash ON instruFund.id.idAsset = cash.idCash"> </framework:entity-query>
<rich:dataTable id="innerJoinQueryList"
var="innerJoinQueryInfo"
value="#{innerJoinQueryList.resultList}" >
<h:column>
<f:facet name="header">
<s:link styleClass="columnHeader"
value="#{messages['instru.securityName']}">
</s:link>
</f:facet>
#{innerJoinQueryInfo.instru.securityName}
</h:column>
<h:column>
<f:facet name="header">
<s:link styleClass="columnHeader"
value="#{messages['cash.securityName']}">
</s:link>
</f:facet>
#{innerJoinQueryInfo.cash.securityName}
</h:column>
</rich:dataTable>
this is really a JPA question, not Seam.
But you should map the relations with a @ManyToOne
Left outer join is not supported in a query, but 'left join fetch' should do what you want, once you map the entities correctly!