I am looking into it. I presume you are using the PB api based on the auto-* being set. I have an almost identical mapping that works fine, but am using the OTM...

I'll play with it against the PB tonight with the auto-* set they way you do and see what I can find. If there is no bug open on it... I encourage you to open one ;-)

-Brian

On Saturday, October 11, 2003, at 03:41 PM, Vincenz Braun wrote:

Hello,

I have the same problem described earlier in this list by
Gerhard Grosse. What is the status of this issue? Is someone
working on this or has at least committed a bug report? I queried
scarab and did not find a matching issue, yet.

Any help greatly appreciated.
Vincenz


original post from Gerhard Grosse:


tried to implement a bi-directional 1:n association between classes User
and UserRole with an anonymous key in UserRole:


<class-descriptor
        class="de.lexcom.noralinkojb.model.User"
        table="OJB.USERS">

        <field-descriptor
                name="id"
                column="ID"
                jdbc-type="INTEGER"
                primarykey="true"
                autoincrement="true"/>

<collection-descriptor
name="roles"
element-class-ref="de.lexcom.noralinkojb.model.UserRole"
auto-retrieve="true"
auto-update="true"
auto-delete="true">
<inverse-foreignkey field-ref="userId"/>
</collection-descriptor>


</class-descriptor>

<class-descriptor
        class="de.lexcom.noralinkojb.model.UserRole"
        table="OJB.USER_ROLES">

        <field-descriptor
                name="userId"
                column="USER_ID"
                jdbc-type="INTEGER"
                primarykey="true"
              access="anonymous"/>

        <field-descriptor
                name="role"
                column="ROLE"
                jdbc-type="INTEGER"
                primarykey="true"/>

        <reference-descriptor
                name="user"
                class-ref="de.lexcom.noralinkojb.model.User"
                auto-retrieve="true">
                <foreignkey field-ref="userId"/>
        </reference-descriptor>

</class-descriptor>

When I now load a User object which has associated UserRoles, the user
attribute of all UserRoles is null. The problem disappears when I make
userId a normal attribute of UserRole.

Is this a known limitation of anonymous keys, is it a bug or am I doing
something wrong here?



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