G'Day,

Just noticed this behaviour and was hoping there was something simple I
could do to fix it.

I have auto-retrieve set to false on a reference-descriptor, and when I load
from the database the associated field-descriptor for it's foreign key is
not populated.
If I set auto-retrieve to true however it does populate the foreign key,
however this is not a viable option for us.

In the example repository xml below, when the object is loaded from the
database the childId attribute is not populated.
Is there a way to make OJB populate the childId even with the
reference-descriptor not auto retrieving?

We only want the id, not the while object (and proxying the object is not a
viable option either).

    <field-descriptor
        name="childId"
        column="child_id"
        jdbc-type="INTEGER"
        nullable="true"/>
...
    <reference-descriptor
         name="child"
         class-ref="com.package.Child"
         auto-update="true"
         auto-retrieve="false"
         auto-delete="false"
         proxy="false">
         <foreignkey field-ref="childId"/>
    </reference-descriptor>

Cory Prowse
Analyst Programmer
InfoComp
Wollongong, Level 2, 63 Market Street
Phone: +61 (0) 2 4298 9158
email: mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
http://www.infocomp.com/ <http://www.infocomp.com/> 

Reply via email to