cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: Problem in fetching the data from multiple tables with relationships.
Date Fri, 14 Dec 2012 10:19:53 GMT
On 13/12/12 7:32pm, Sampath Uppula wrote:
> Please look at the following solution... I had implemented for similar scenario.
> In the below code, I am able to fetch all the data from the relationships tables. But
the problem is I am forced to hardcode the return types (List<Role> List<LOB>
...).
> Because of that I am not able to develop a strategic solution.
>
> In other words the requirement is,
> Depends on the requirement, columns in the criteria and columns in the fetch will be
different. How can I achieve this using cayenne?
> Hope you understand my problem now.

Not really. You asked for a solution to a problem which was fetching data and following relations.
Note that your prefetches are not needed, they are only a way to improve performance in some
situations.

Nothing in Cayenne forces you to specify the specific entity in the generics. You can treat
the List as <PersistentObject> and handle it how you choose.


Ari



-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message