Hallo everybody,

for the following problem I didn't find a proper solution:
I'm using the ReportQuery to retrieve data, because the table has about 25 columns and i only need a few. The problem is, in the ReportQuery I can only specifiy the fields which I want to retrieve, but no collections.

I've got the following classes/tables:

<class-descriptor class="modulverwaltung.beans.ojb.Module"
        table="MODUL">
        <field-descriptor name="name" column="modul_Name"
                jdbc-type="VARCHAR" primarykey="true" />
        <field-descriptor name="courseOfStudy" column="Zuordnung"
                jdbc-type="VARCHAR" />
        ...
        ...
        <collection-descriptor name="disciplines"
        element-class-ref="modulverwaltung.beans.ojb.ModuleDiscipline"
                orderby="disciplineName" sort="ASC">
                <inverse-foreignkey field-ref="moduleName" />
        </collection-descriptor>
</class-descriptor>

<class-descriptor class="modulverwaltung.beans.ojb.ModuleDiscipline"
        table="MODUL_BEREICH">
        <field-descriptor name="moduleName" column="MODUL_NAME"
                jdbc-type="VARCHAR" primarykey="true" />
        <field-descriptor name="disciplineName" column="BEREICH_NAME"
                jdbc-type="VARCHAR" primarykey="true" />
</class-descriptor>

To retrieve date from the table MODUL, I could do like this:
QueryByCriteria q = new QueryByCriteria(Module.class, QueryByCriteria.CRITERIA_SELECT_ALL);
q.addOrderByAscending("name");
c = broker.getCollectionByQuery(q);

But then all the fields from the according table would be retrieved, whereas I only need two fields plus the specified collection.

On the other hand, when I use a ReportQuery in order to retrieve only the fields I actually need, I can't specify the collection in the ReportQuery.

Anybody got an idea what I can do?

Best regards,

Abid Hussain

--

Abid Hussain
Mail: [EMAIL PROTECTED]
Web: http://www.abid76.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to