Is there a way to set an additional selector on a collection attribute?
For example
public class A {
protected int id;
protected int bId;
protected int selection;
public A() {
}
}
public class B {
protected int id;
protected Collection asSelectedOne;
protected Collection asSelectedTwo
public B() {
}
}
A.bId references B.id;
A.selection is set to 1 or 2
B.asSelectedOne references all A's with A.bId = B.id and selection = 1
B.asSelectedTwo references all A's with A.bId = B.id and selection = 2
Can this be modeled/mapped in OJB? I cant seem to track it down. I picture
somethign like
<class-descriptor class="A" table="TABLE_A" >
<field-descriptor
id="1" name="Id" column="ID" jdbc-type="INTEGER" nullable="false"
primarykey="true" autoincrement="true"
/>
<field-descriptor
id="2" name="bId" column="BID" jdbc-type="INTEGER" nullable="true"
/>
<field-descriptor
id="3" name="selection" column="SELECTION" jdbc-type="INTEGER"
/>
</class-descriptor>
<!-- -->
<class-descriptor class="B" table="TABLE_B" >
<field-descriptor
id="1" name="id" column="ID" jdbc-type="INTEGER" nullable="false"
primarykey="true" autoincrement="true"
/>
<collection-descriptor
name="asSelectedOne"
element-class-ref="com.cgc.doclib.DefaultStreamImpl"
>
<inverse-foreignkey field-id-ref="2"/>
<value field-id-ref="3" value="1">
</collection-descriptor>
<collection-descriptor
name="asSelectedTwo"
element-class-ref="com.cgc.doclib.DefaultStreamImpl"
>
<inverse-foreignkey field-id-ref="2"/>
<value field-id-ref="3" value="2">
</collection-descriptor>
</class-descriptor>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>