You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Lucy Zhao <lz...@baan.com> on 2003/05/18 21:32:17 UTC
wired behavior when retrieving object with more than one collecti
on references
I have a Group class that has two collection references:
<class-descriptor class="com.XXX.Group" table="GROUPS">
<field-descriptor id="4" name="id" column="ID" primarykey="true"
jdbc-type="VARCHAR" nullable="false" length="20" precision="0" />
...
<collection-descriptor name="userGroup"
element-class-ref="com.XXX.UserGroup" auto-update="true" auto-delete="true"
refresh="true" >
<inverse-foreignkey field-ref="groupId"/>
</collection-descriptor>
<collection-descriptor name="groupPermission"
element-class-ref="com.XXX.GroupPermission" auto-update="true"
auto-delete="true" refresh="true" >
<inverse-foreignkey field-ref="groupId"/>
</collection-descriptor>
</class-descriptor>
When retrieving the Group object using PB API, it retrieve the first
collection reference 'UserGroup' just fine. But only retrieve one associated
object of the second collection reference 'GroupPermission'. I tried
changing the order of the two collection reference and find out that the
first collection reference always returns fine. But the second collection
reference only returns one object (collection.size()=1;).
I'm using OJB 1.0 rc3. Am I missing anything?
Thank you!
Lucy