I have a quite simple problem: I have a table company, a table team and a table company_team which stores the relations.
Now I have to introduce a position-attribute in my company_team - table. I mapped this to the ojb-repository.xml file - but now it behaves quite strange: When I select 1 company and want to know what links it has to other teams the link result (i.e. classes of type CompanyTeam representing instances of table company_team) is always the complete extent of CompanyTeam, which is definitely not what I want. :-( I already have such a relationship from Team->Team and this works.
Here is an excerpt form my repository.xml:
<!-- Company -->
<class-descriptor class="kos.intranet2.om.Company" table="Company">
.....
<collection-descriptor
name="companyTeams"
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
element-class-ref="kos.intranet2.om.CompanyTeam"
auto-retrieve="true"
auto-update="true"
auto-delete="false"
proxy="true">
</collection-descriptor>
</class-descriptor>
<!-- Company END -->
<class-descriptor class="kos.intranet2.om.CompanyTeam" table="Company_Team">
<field-descriptor name="id" column="COTE_ID" jdbc-type="INTEGER"/>
<field-descriptor name="position" column="COTE_Position" jdbc-type="INTEGER"/>
<field-descriptor name="companyId" column="COTE_Company" jdbc-type="INTEGER" access="anonymous" primarykey="true"/>
<field-descriptor name="teamId" column="COTE_Team" jdbc-type="INTEGER" access="anonymous" primarykey="true"/>
<reference-descriptor name="company" class-ref="kos.intranet2.om.Company">
<foreignkey field-ref="companyId"/>
</reference-descriptor>
<reference-descriptor name="team" class-ref="kos.intranet2.om.Team">
<foreignkey field-ref="teamId"/>
</reference-descriptor>
</class-descriptor><class-descriptor class="kos.intranet2.om.Team" table="Team">
.....
<collection-descriptor
name="companyTeams"
collection-class="org.apache.ojb.broker.util.collections.ManageableArrayList"
element-class-ref="kos.intranet2.om.CompanyTeam"
auto-retrieve="true"
auto-update="true"
auto-delete="false"
proxy="true">
</collection-descriptor>
</class-descriptor>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
