I need to run some recursive query against a two tables (productGroup, products) where productgroup is a hierarchical tree model. I need get all the products belong to the subtree.
I implemented SQL query with CTE expression in PostgreSQL. The query runs fine in service, but i need to populate in the client tier a table component with the result set.
How can I give back a resultset to the client tier to acomplish this.
The Middleware does not know about collectionDatasource, the client tier datasource can except only JPQL query which is not able to do this type of query.
I can return a List from the middleware service, but i don’t know how to load this list into the collectiondatasource
It is work I can return a customcollectiondataset.
But this rise another problem for this I haven’t any clue how to solve.
The problem is that the table requires a specific view of that entity which includes other entities too. (like one side of manytoone relationships) And the Collection cannot include this.
IS there any mechanism to instruct the datasource to lazy load all required attributes?