You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by my <ma...@redcentre.com> on 2005/04/10 10:30:25 UTC

Caching Problem?

Hi,

I am fairly inexperienced with OJB and seem to be having an issue that may
be related to caching.  I have a class StockItem which includes references
to a Warehouse and Product.  If I create a new StockItem and then retreive a
list of StockItems, the newly created item is listed.  If however I create a
second StockItem, the Warehouse and Product references are missing when I
subsequently retreive the list of Stock Items.  After an amount of time the
list will be correctly retreived.  My repository record is included below.
Any assistance will be appreciated - thank you in anticipation.

Mark

<!-- Definitions for com.eclipsej.imas.stock.businessobjects -->
<class-descriptor class="com.eclipsej.imas.stock.businessobjects.StockItem"
table="CB_STOCK">
  <field-descriptor name="id" column="ID" jdbc-type="BIGINT"
primarykey="true" autoincrement="true"/>
  <field-descriptor name="productId" column="PRODUCT_ID"
jdbc-type="BIGINT"/>
  <field-descriptor name="warehouseId" column="WAREHOUSE_ID"
jdbc-type="BIGINT"/>
  <field-descriptor name="attribute_1" column="ATTRIBUTE_1"
jdbc-type="VARCHAR"/>
  <field-descriptor name="attribute_2" column="ATTRIBUTE_2"
jdbc-type="VARCHAR"/>
  <field-descriptor name="status" column="STATUS" jdbc-type="VARCHAR"/>
  <field-descriptor name="shipment" column="SHIPMENT" jdbc-type="VARCHAR"/>
  <field-descriptor name="registered" column="REGISTERED" jdbc-type="DATE"/>

  <reference-descriptor
    name="product"
    class-ref="com.eclipsej.imas.products.businessobjects.Product"
    auto-retrieve="true"
    auto-update="true">
    <foreignkey field-ref="productId"/>
  </reference-descriptor>

  <reference-descriptor
    name="warehouse"
    class-ref="com.eclipsej.imas.contacts.businessobjects.Warehouse"
    auto-retrieve="true"
    auto-update="true">
    <foreignkey field-ref="warehouseId"/>
  </reference-descriptor>

    <collection-descriptor
       name="histories"
       element-class-ref="com.eclipsej.imas.stock.businessobjects.History"
       orderby="registered"
       sort="DESC"
       auto-retreive="true"
       auto-update="true"
       auto-delete="true"
    >
       <inverse-foreignkey field-ref="stockItemId"/>
    </collection-descriptor>


</class-descriptor>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org