I saw ReferenceTest test worked with OJB 1.0.1 too, with a different mapping of the interface. Did you tried to declare the reference-descriptor and fk-field in the interface class mapping too?

e.g.
Class RefObject is an interface

<class-descriptor class="org.apache.ojb.broker.ReferenceTest$RefObject">
<extent-class class-ref="org.apache.ojb.broker.ReferenceTest$ObjA"/>
<extent-class class-ref="org.apache.ojb.broker.ReferenceTest$ObjB"/>
<extent-class class-ref="org.apache.ojb.broker.ReferenceTest$ObjC"/>


        <field-descriptor
             name="fkId"
             column="FK_REF"
             primarykey="false"
             jdbc-type="INTEGER"
            access="anonymous"
        />

        <reference-descriptor
            name="ref"
            class-ref="org.apache.ojb.broker.ReferenceTest$RefObject"
            proxy="false"
            auto-retrieve="true"
            auto-update="true"
            auto-delete="false">
                <foreignkey field-ref="fkId"/>
        </reference-descriptor>

    </class-descriptor>

If this doesn't work, try the mapping mentioned by Tom.

regards,
Armin


Maksimenko Alexander wrote:
Armin Waibel wrote:

Maksimenko Alexander wrote:

I'm using 1.0.1 version
ojb doesnt produce exception but it generates

SELECT A0.GROUP_ID,A0.ID FROM USER A0 WHERE A0.GROUP_ID = ?
instead of:
SELECT A0.GROUP_ID,A0.ID FROM USER A0, group1 a1 WHERE A0.GROUP_ID = a1.id and a1.manager_id=?



AFAIK Jakob fixed some bugs in conjunction with query references. So I recommend to give upcoming OJB 1.0.2 from OJB_1_0_RELEASE branch a change.



great! i look forward to this release i hope it'll solve my problem ;)



---------------------------------------------------------------------
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