preventing foreign key to set to null

"Christopher Cheng" <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
It seems that if set "auto-retrieve" to false for foreign key object, when I 
call broker.store(), it will also set the foreign key to null also!

Supposing I have 2 tables Checks and CheckBooks

<class-descriptor
        class="Check"
        table="Checks">
     <field-descriptor
            name="checkBookId"
            column="CheckBookId"
            jdbc-type="BIGINT"
            />
     ....
     <reference-descriptor
            name="checkBook"
            class-ref="CheckBook"
            auto-retrieve="false"
            auto-update="false"
            auto-delete="false">
        <foreignkey field-ref="checkBookId"/>
    </reference-descriptor>
</class-descriptor>

As I call
broker.retrieveObject,
the checkbook attribute is null because auto-retrieve = false

As I call
broker.store(check);
OJB will set checkBookId to null also!!

Is the only way to do is to use proxy??
Is there any other easy way to do prevent this from happening?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.