HI,
is there any way to use the filter also for valueCollectionDatasource ?
When I use the query with a where everything is working fine. See first example
where Clausel - works
Code blocks
<dsContext>
<valueCollectionDatasource id="newDs">
<query>
<![CDATA[select e.bezeichnung, e.wertenum, sum(b.betrag) from tabletest$Firma e
left join e.bestellungen b
where (e.id = :component$firmalookupField) group by e.bezeichnung, e.wertenum]]>
</query>
<properties idProperty="bezeichnung">
<property class="com.company.tabletest.entity.Firma" name="bezeichnung"/>
<property class="com.company.tabletest.entity.Firma" name="wertenum"/>
<property datatype="decimal" name="sum"/>
</properties>
</valueCollectionDatasource>
<collectionDatasource id="firmaDs" class="com.company.tabletest.entity.Firma" view="_minimal">
<query>
<![CDATA[select e from tabletest$Firma e]]>
</query>
</collectionDatasource>
</dsContext>
When I try to use a filter instead, I will get an error (comma missing)
Filter - does not work
Code blocks
<dsContext>
<valueCollectionDatasource id="newDs">
<query>
<![CDATA[select e.bezeichnung, e.wertenum, sum(b.betrag) from tabletest$Firma e left join e.bestellungen b group by e.bezeichnung, e.wertenum]]>
<filter>
<c>e.id = :component$firmalookupField</c>
</filter>
</query>
<properties idProperty="bezeichnung">
<property class="com.company.tabletest.entity.Firma" name="bezeichnung"/>
<property class="com.company.tabletest.entity.Firma" name="wertenum"/>
<property datatype="decimal" name="sum"/>
</properties>
</valueCollectionDatasource>
<collectionDatasource id="firmaDs" class="com.company.tabletest.entity.Firma" view="_minimal">
<query>
<![CDATA[select e from tabletest$Firma e]]>
</query>
</collectionDatasource>
</dsContext>
Regards,
Torsten