Still no luck.  I noticed that my primary key order might have something to do with it 
so I switched the order within the OrderItemVO mapping, but it didn't seem to help.   
I realized that based on the logging that OJB does not seem to even be trying to 
materialize the OfferVO object as no notice is printed about it trying.   Here is my 
logging:


[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG: executeQuery : Query from 
class com.jobbank.jobbank.model.order.OrderItemVO
 where [EMAIL PROTECTED]
[org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl] DEBUG: SQL:SELECT 
A0.modified,A0.offerid,A0.disabled,A0.mid,A0.offerq
uantity,A0.orderid,A0.buylater,A0.added FROM orderitem A0 WHERE (mid =  ? ) AND 
orderid =  ?
[org.apache.ojb.broker.accesslayer.JdbcAccessImpl] DEBUG: executeQuery: [EMAIL 
PROTECTED]: SELECT A0.modified,
A0.offerid,A0.disabled,A0.mid,A0.offerquantity,A0.orderid,A0.buylater,A0.added FROM 
orderitem A0 WHERE (mid =  2 ) AND orderid =  0
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> true
[org.apache.ojb.broker.accesslayer.RsIterator] DEBUG: hasNext() -> false
[org.apache.ojb.broker.core.PersistenceBrokerImpl] DEBUG: PB.close was called: [EMAIL 
PROTECTED]
8
TEST CartItem: [2|0|1|1|false|[2003-10-31 02:50:11.515|2003-10-31 02:50:11.515|false]|]
WITH OFFER: null
TEST:  After ShoppingCartActions.populateMemberShoppingCart()






----- Original Message -----
From: [EMAIL PROTECTED]
Date: Friday, October 31, 2003 1:56 am
Subject: Another silly newbie mapping question

> 
> I have worked out much harder mapping problems then this, but for 
> some reason I am still a bit new on this stuff and making no 
> headway.  I would appreciate a more seasoned glance.
> 
> Problem:  OfferVO is not being materialized after succesfully 
> retrieving the Collection of OrderItemVO by using 
> getCollectionByQuery(query).  Each OrderItemVO should have exactly 
> one OfferVO, but the reference to the OfferVO only returns null.
> 
> 
> 
> <!-- Definitions for the OrderItemVO object -->
> <class-descriptor 
> class="com.jobbank.jobbank.model.order.OrderItemVO" table="orderitem">
>    <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="offerId"
>        column="offerid"
>        jdbc-type="INTEGER"
>        primarykey="true"
>    />
>    <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 -->
> <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"
>    />
>    <collection-descriptor
>            name="offeredProducts"
>            element-class-
> ref="com.jobbank.jobbank.model.offer.OfferedProductVO"            
> proxy="true">        <inverse-foreignkey field-ref="offerId"/>
>    </collection-descriptor>
> </class-descriptor>
> 
> 
> Thank you muchly,
> 
> JohnE
> 
> 
> 
> -------------------------------------------------------------------
> --
> 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