Hello John, 

I am stumped too (not that says very much, I am a newbie to OJB). 

Have you tried RC4? 

Bob c
----------------------------------------------------------------
Bob Celestino
SAS Research and Development
919 - 531 - 9425
[EMAIL PROTECTED]

SAS - The Power to Know


  > -----Original Message-----
  > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
  > Sent: Tuesday, November 04, 2003 2:03 PM
  > To: OJB Users List
  > Subject: Still not understanding why getCollectionByQuery() 
  > is not getting sub-object.
  > 
  > 
  > 
  > 
  > 
  > 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.fieldacc
  > ess.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.Bo
  > olean2IntFieldConversion"
  >     />
  >     <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.Bo
  > olean2IntFieldConversion"
  >     />
  >     <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.Bo
  > olean2IntFieldConversion"
  >     />
  >     <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]
  > 
  > 

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

Reply via email to