RE: Still not understanding why getCollectionByQuery() is not getting sub-object.

2003-11-06 Thread Robert J Celestino
John,

I think the proper syntax for nested fields is "::" not "->" 
eg "status::modified" instead of "status->modified"


-Original Message-
From: LAURENT Stephane [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 05, 2003 5:38 AM
To: OJB Users List
Subject: Re: Still not understanding why getCollectionByQuery() is not getting 
sub-object.


Hi,
I'm now in RC4 but never have this kind of pb with RC2.
Just a difference for me, my repository contain this :  Not 
this :  But if 
you can retrieve objects "manually", it's probably not your pb ...

I never seen this syntax before :" -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:
> 
> 
> 
>  
>  class="com.jobbank.jobbank.model.order.OrderItemVO" 
> table="orderitem">
>  name="offerId"
> column="offerid"
> jdbc-type="INTEGER"
> primarykey="true"
> />
>  name="memberId"
> column="mid"
> jdbc-type="INTEGER"
> primarykey="true"
> />
>  name="orderId"
> column="orderid"
> jdbc-type="INTEGER"
> primarykey="true"
> />
>  name="offerQuantity"
> column="offerquantity"
> jdbc-type="INTEGER"
> />
>  name="buyLater"
> column="buylater"
> jdbc-type="INTEGER"
> 
> conversion="org.apache.ojb.broker.accesslayer.conversions.Bo
> olean2IntFieldConversion"
> />
>  name="status->modified"
> column="modified"
> jdbc-type="TIMESTAMP"
> />
>  name="status->added"
> column="added"
> jdbc-type="TIMESTAMP"
> />
>  name="status->disabled"
> column="disabled"
> jdbc-type="INTEGER"
> 
> conversion="org.apache.ojb.broker.accesslayer.conversions.Bo
> olean2IntFieldConversion"
> />
>  name="offer"
> class-ref="com.jobbank.jobbank.model.offer.OfferVO"
> auto-retrieve="true"
> auto-update="false"
> auto-delete="false">
>   
> 
> 
> 
> 
> 
> 
>   class="com.jobbank.jobbank.model.offer.OfferVO" table="offer"
>   auto-retrieve="true" auto-update="false" 
> auto-delete="false">
>  name="offerId"
> column="offerid"
> jdbc-typ

Re: Still not understanding why getCollectionByQuery() is not getting sub-object.

2003-11-06 Thread LAURENT Stephane
Hi,
I'm now in RC4 but never have this kind of pb with RC2.
Just a difference for me, my repository contain this :

Not this :

But if you can retrieve objects "manually", it's probably not your pb ...

I never seen this syntax before :" -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:
> 
> 
> 
>  
>  class="com.jobbank.jobbank.model.order.OrderItemVO" 
> table="orderitem">
>  name="offerId"
> column="offerid"
> jdbc-type="INTEGER"
> primarykey="true"
> />
>  name="memberId"
> column="mid"
> jdbc-type="INTEGER"
> primarykey="true"
> />
>  name="orderId"
> column="orderid"
> jdbc-type="INTEGER"
> primarykey="true"
> />
>  name="offerQuantity"
> column="offerquantity"
> jdbc-type="INTEGER"
> />
>  name="buyLater"
> column="buylater"
> jdbc-type="INTEGER"
> 
> conversion="org.apache.ojb.broker.accesslayer.conversions.Bo
> olean2IntFieldConversion"
> />
>  name="status->modified"
> column="modified"
> jdbc-type="TIMESTAMP"
> />
>  name="status->added"
> column="added"
> jdbc-type="TIMESTAMP"
> />
>  name="status->disabled"
> column="disabled"
> jdbc-type="INTEGER"
> 
> conversion="org.apache.ojb.broker.accesslayer.conversions.Bo
> olean2IntFieldConversion"
> />
>  name="offer"
> class-ref="com.jobbank.jobbank.model.offer.OfferVO"
> auto-retrieve="true"
> auto-update="false"
> auto-delete="false">
>   
> 
> 
> 
> 
> 
> 
>   class="com.jobbank.jobbank.model.offer.OfferVO" table="offer"
>   auto-retrieve="true" auto-update="false" 
> auto-delete="false">
>  name="offerId"
> column="offerid"
> jdbc-type="INTEGER"
> primarykey="true"
> />
>  name="name"
> column="name"
> jdbc-type="VARCHAR"
> />
>  name="offerPrice"
> column="offerprice"
> jdbc-type="DOUBLE"
> />
>  name="offerStarts"
> column="offerstarts"
> jdbc-type="TIMESTAMP"
> />
>  name="offerEnds"
> column="offerends"
> jdbc-type="TIMESTAMP"
> />
>  name="exposure"
> column="exposure"
> jdbc-type="INTEGER"
> />
>  name="url"
> column="url"
> jdbc-type="VARCHAR"
> />
>  name="description"
> column="description"
> jdbc-type="VARCHAR"
> />
>  name="status->modified"
> column="modified"
> jdbc-type="TIMESTAMP"
> />
>  name="status->added"
> column="added"
> jdbc-type="TIMESTAMP"
> />
>  name="status->disabled"
> column="disabled"
> jdbc-type="INTEGER"
> 
> conversion="org.apache.ojb.broker.accessl

RE: Still not understanding why getCollectionByQuery() is not getting sub-object.

2003-11-04 Thread Robert J Celestino
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:
  > 
  > 
  > 
  >  
  >  class="com.jobbank.jobbank.model.order.OrderItemVO" 
  > table="orderitem">
  >  name="offerId"
  > column="offerid"
  > jdbc-type="INTEGER"
  > primarykey="true"
  > />
  >  name="memberId"
  > column="mid"
  > jdbc-type="INTEGER"
  > primarykey="true"
  > />
  >  name="orderId"
  > column="orderid"
  > jdbc-type="INTEGER"
  > primarykey="true"
  > />
  >  name="offerQuantity"
  > column="offerquantity"
  > jdbc-type="INTEGER"
  > />
  >  name="buyLater"
  > column="buylater"
  > jdbc-type="INTEGER"
  > 
  > conversion="org.apache.ojb.broker.accesslayer.conversions.Bo
  > olean2IntFieldConversion"
  > />
  >  name="status->modified"
  > column="modified"
  > jdbc-type="TIMESTAMP"
  > />
  >  name="status->added"
  > column="added"
  > jdbc-type="TIMESTAMP"
  > />
  >  name="status->disabled"
  > column="disabled"
  > jdbc-type="INTEGER"
  > 
  > conversion="org.apache.ojb.broker.accesslayer.conversions.Bo
  > olean2IntFieldConversion"
  > />
  >  name="offer"
  > class-ref="com.jobbank.jobbank.model.offer.OfferVO"
  > auto-retrieve="true"
  > auto-update="false"
  > auto-delete="false">
  >   
  > 
  > 
  > 
  > 
  > 
  > 
  >   class="com.jobbank.jobbank.model.offer.OfferVO" table="offer"
  >   auto-retrieve="true" auto-update="false" 
  > auto-delete="false">
  >  name="offerId"
  > column="offerid"
  > jdbc-type="INTEGER"
  > primarykey="true"
  > />
  >  name="name"
  > column="name"
  > jdbc-type="VARCHAR"
  > />
  >  name="offerPrice"
  > column="offerprice"
  > jdbc-type="DOUBLE"
  > />
  >  name="offerStarts"
  > column="offerstarts"
  > jdbc-type="TIMESTAMP"
  > />
  >  name="offerEnds"
  > column="offerends"
  > jdbc-type="TIMESTAMP"
  > />
  >  name="exposure"
  > column="exposure"
  > jdbc-type="INTEGER"
  > />
  >  name="url"
  > column="url"
  > jdbc-type="VARCHAR"
  > />
  >  name="description"
  > column="description"
  > jdbc-type="VARCHAR"
  > />
  >  name="status->modified"
  > column="modified"
  > jdbc-type="TIMESTAMP"
  > />
  >  name="status->added"
  > column="added"
  > jdbc-type="TIMESTAMP"
  > />
  >  name="status->disabled"
  > column="disabled"
  > jdbc-type="INTEGER"
  > 
  > conversion="org.apache.ojb.broker.accesslayer.conversions.Bo
  > olean2IntFieldConversion"
  > />
  >  name="offeredProducts"
  > 
  > element-class-ref="com.jobbank.jobbank.model.offer.OfferedProductVO"
  > proxy="true">
  > 
  > 
  >