has anyone been successfully mapping two objects to the same table??
to be more specific, i would like distinct object instances for objectAId and distinct
object instances for objectBId in seperate queries.
select distinct objectA_id from tableAB;
select distinct objectB_id from tableAB;
i have used the distinct clause on the QueryCriteria class but i have not been
successfully, because OJB wants to concatenate objectAId and objectBid together in the
following sql;
select distinct objectA_id, objectB_id from tableAB;
why does OJB combine objectA_id and objectB_id in the select clause of the query if
two class descriptors exist for the same table?
i did try the reportQuery to restrict the columns. i got the sql that is generated
seems to be correct. however ojb is throwing an invalid class cast exception which i
don't understand.
any thoughts are much appreciated?
<!-- Definitions objectA -->
<class-descriptor
class="objectA"
table="tableAB"
>
<field-descriptor id="1"
name="objectAId"
column="OBJECTA_ID"
jdbc-type="INTEGER"
primarykey="true"
/>
</class-descriptor>
<!-- Definitions objectB -->
<class-descriptor
class="objectB"
table="tableAB"
>
<field-descriptor id="1"
name="objectBId"
column="OBJECTB_ID"
jdbc-type="INTEGER"
primarykey="true"
/>
</class-descriptor>
---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search