In trying to add a document management piece into our system, we are trying
to use extent-class for a first time to represent a Document and a
DocumentWithDisplays.  Basically the DocumentWithDisplays is a Document with
a collection of proxied Display objects.

This is working except for one thing.
1. Listing the documents with Displays works.
2. Deleting one of the Displays separately, not as part of the
DocumentWIthDisplays query, works in the database, but when the screen
attempts to re-get and re-draw the display as in #1, the document does not
show up as cleared out of the proxied collection of Displays.   This occurs
even though I have done a broker.removeFromCache(object) of the deleted
object.
3. When I do a different query elsewhere, the object is recognized as gone,
and all of a sudden it shows up in #1 correctly, but not until a different
query is done.

Sounds confusing, but shouldn't the removeFromCache() have cleared the
object reference and not allowed it to remained in the proxied collection of
Displays?

Here is my extent-class XML description.  Maybe I am doing something wrong
you can point out.  Thank you.


<!-- Definitions for the DocumentVO object -->
<class-descriptor class="com.model.document.DocumentVO"  table="document">

        <!-- -1 within a per class cache forces the cache to stay in memory. -->
        <object-cache
                class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl">
                <attribute attribute-name="timeout" attribute-value="-1" />
        </object-cache>
        
        <extent-class
class-ref="com.jmjmedia.sp.model.document.display.DocumentWithDisplaysVO" />

        <field-descriptor name="docId" column="doc_id"
                jdbc-type="BIGINT" primarykey="true" autoincrement="true" />
        <field-descriptor name="title" column="title" jdbc-type="VARCHAR" />
        <field-descriptor name="status::isDisabled" column="isdisabled"
jdbc-type="INTEGER"
        
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
/>

        <reference-descriptor
                name="docContent"
                class-ref="com.model.document.DocumentContentVO"
                proxy="dynamic" auto-retrieve="true" auto-update="object"
auto-delete="object">
            <foreignkey field-ref="docId"/>
        </reference-descriptor>

</class-descriptor>



<!-- Definitions for the DocumentContentVO object -->
<class-descriptor class="com.model.document.DocumentContentVO"
        table="doc_content">

        <field-descriptor name="docId" column="doc_id"
                jdbc-type="BIGINT" primarykey="true" />
        <field-descriptor name="content" column="content"
                jdbc-type="LONGVARCHAR" />

</class-descriptor>



<!-- Definitions for the DocumentWithDisplaysVO object -->
<class-descriptor class="com.model.document.display.DocumentWithDisplaysVO"
        table="document">

        <!-- -1 within a per class cache forces the cache to stay in memory. -->
        <object-cache
                class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl">
                <attribute attribute-name="timeout" attribute-value="-1" />
        </object-cache>

        <field-descriptor name="docId" column="doc_id"
                jdbc-type="BIGINT" primarykey="true" autoincrement="true" />
        <field-descriptor name="title" column="title" jdbc-type="VARCHAR" />
        <field-descriptor name="status::isDisabled" column="isdisabled"
jdbc-type="INTEGER"
        
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
/>

        <reference-descriptor
                name="docContent"
                class-ref="com.model.document.DocumentContentVO"
                proxy="dynamic" auto-retrieve="true"
                auto-update="object" auto-delete="object">
            <foreignkey field-ref="docId"/>
        </reference-descriptor>

        <collection-descriptor name="documentDisplays"
        
element-class-ref="com.jmjmedia.sp.model.document.display.DocumentDisplayVO"
                proxy="dynamic"
                auto-retrieve="true"
                auto-update="object"
                auto-delete="object">
            <inverse-foreignkey field-ref="docId" />
        </collection-descriptor>
</class-descriptor>


<!-- Definitions for the DocumentDisplayVO object -->
<class-descriptor
class="com.jmjmedia.sp.model.document.display.DocumentDisplayVO"
        table="doc_display">

        <!-- -1 within a per class cache forces the cache to stay in memory. -->
        <object-cache
                class="org.apache.ojb.broker.cache.ObjectCacheDefaultImpl">
                <attribute attribute-name="timeout" attribute-value="-1" />
        </object-cache>

        <field-descriptor name="docDispId" column="dsp_id"
                jdbc-type="BIGINT" primarykey="true" autoincrement="true" />
        <field-descriptor name="docId" column="doc_id" jdbc-type="BIGINT" />
        <field-descriptor name="displayCategory" column="ddc_id" 
jdbc-type="BIGINT"
indexed="true"
               
conversion="com.common.codelist.type.DocumentDisplayCategoryCL" />
        <field-descriptor name="status::isDisabled" column="isdisabled"
                jdbc-type="INTEGER"
        
conversion="org.apache.ojb.broker.accesslayer.conversions.Boolean2IntFieldConversion"
/>

</class-descriptor>



-----
JohnE

http://www.jobbank.com jobbank.com 
-- 
View this message in context: 
http://www.nabble.com/Caching-issue-tp19258687p19258687.html
Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive at 
Nabble.com.


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

Reply via email to