You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Joe Taylor <jo...@jtinnovations.com> on 2003/05/28 19:29:16 UTC
class descriptors & data views
Hi Folks,
Just looking for a way to retrieve different views of data, the scenario
is this. I have a table (table1) with a relationship to another table
(table2), at times I may want to retrieve all the information from
table1 and the related information from table2, however, there are other
times when I may only wish to retrieve a summary of information from table1.
I've tried this by setting up two different value objects, one that
contains a full view and the other as a summary view - then built a
matching class-descriptor for each. When I run my query in both
situations it appears to work, however the debug shows me something that
I wouldn't expect when running the summary query, it shows that the
executeQuery is using the summary class as expected, however, the actual
SQL shows a select that contains ALL of the columns on the table (in
this example table1). If I proceed to comment out the class-descriptor
that reflects the full view and re-run my summary test the SQL is as I
expect containing only the summary fields - if this makes sense does
anyone have any idea of what I might be doing wrong? I thought this was
doable but maybe I have to approach getting different views of data in
another way.
Any input is appreciated, thanks.
Joe