Is anybody aware of anything in RC2 that would prevent getCollectionByQuery() from 
realizing sub-objects?   I get N records using getCollectionByQuery() successfully, 
but this OfferVO subobject continues to not show its ugly head unless I manually get 
each sub-object.

I have auto-retrieve="true" everywhere.

I successfully get a different sub-reference on a different non-collection object.
My mapping is correct in that manual retieval works.

I thought sub-objects would be realized with getCollectionByQuery() unlike with 
getIteratorByQuery().


I am wondering if it could have something to do with the fact that the Collection of 
OrderItemVO has 3 primary keys or something to do with the below setting in the 
OJB.properties I needed to allow for '->' Single Table Aggregation.  '->' was only 
allowed as far as I know in RC2 using this setting.  I don't know if it was 
implemented in the default setting since.

PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentNestedFieldMaxPerformanceImpl


My repository.xml as it is today for the two important tables follows:



<!-- Definitions for the OrderItemVO object which is retrieved with the 
getCollectionByQuery()  -->
<class-descriptor class="com.jobbank.jobbank.model.order.OrderItemVO" 
table="orderitem">
    <field-descriptor
        name="offerId"
        column="offerid"
        jdbc-type="INTEGER"
        primarykey="true"
    />
    <field-descriptor
        name="memberId"
        column="mid"
        jdbc-type="INTEGER"
        primarykey="true"
    />
    <field-descriptor
        name="orderId"
        column="orderid"
        jdbc-type="INTEGER"
        primarykey="true"
    />
    <field-descriptor
        name="offerQuantity"
        column="offerquantity"
        jdbc-type="INTEGER"
    />
    <field-descriptor
        name="buyLater"
        column="buylater"
        jdbc-type="INTEGER"
        
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
    />
    <field-descriptor
        name="status->modified"
        column="modified"
        jdbc-type="TIMESTAMP"
    />
    <field-descriptor
        name="status->added"
        column="added"
        jdbc-type="TIMESTAMP"
    />
    <field-descriptor
        name="status->disabled"
        column="disabled"
        jdbc-type="INTEGER"
        
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
    />
    <reference-descriptor
            name="offer"
            class-ref="com.jobbank.jobbank.model.offer.OfferVO"
            auto-retrieve="true"
            auto-update="false"
            auto-delete="false">
          <foreignkey field-ref="offerId"/>
    </reference-descriptor>
</class-descriptor>




<!-- Definitions for the OfferVO object which won't retrieve itself automatically -->
<class-descriptor class="com.jobbank.jobbank.model.offer.OfferVO" table="offer"
                  auto-retrieve="true" auto-update="false" auto-delete="false">
    <field-descriptor
        name="offerId"
        column="offerid"
        jdbc-type="INTEGER"
        primarykey="true"
    />
    <field-descriptor
        name="name"
        column="name"
        jdbc-type="VARCHAR"
    />
    <field-descriptor
        name="offerPrice"
        column="offerprice"
        jdbc-type="DOUBLE"
    />
    <field-descriptor
        name="offerStarts"
        column="offerstarts"
        jdbc-type="TIMESTAMP"
    />
    <field-descriptor
        name="offerEnds"
        column="offerends"
        jdbc-type="TIMESTAMP"
    />
    <field-descriptor
        name="exposure"
        column="exposure"
        jdbc-type="INTEGER"
    />
    <field-descriptor
        name="url"
        column="url"
        jdbc-type="VARCHAR"
    />
    <field-descriptor
        name="description"
        column="description"
        jdbc-type="VARCHAR"
    />
    <field-descriptor
        name="status->modified"
        column="modified"
        jdbc-type="TIMESTAMP"
    />
    <field-descriptor
        name="status->added"
        column="added"
        jdbc-type="TIMESTAMP"
    />
    <field-descriptor
        name="status->disabled"
        column="disabled"
        jdbc-type="INTEGER"
        
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
    />
    <collection-descriptor
            name="offeredProducts"
            element-class-ref="com.jobbank.jobbank.model.offer.OfferedProductVO"
            proxy="true">
        <inverse-foreignkey field-ref="offerId"/>
    </collection-descriptor>
</class-descriptor>








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

Reply via email to