Hello Tom,
I really appreciate your immediate response. I will test this out (I am
sure it will work). Did you use any tool to generate all of this? Please
let me know.
Thank you,
-Vamsi
--- Thomas Dudziak <[EMAIL PROTECTED]> wrote:
> How about this:
>
> /**
> * @ojb.class table="A"
> */
> class A
> {
> /**
> * @ojb.field column="A_ID"
> * nullable="false"
> * primarykey="true"
> * autoincrement="ojb"
> */
> private Integer id;
> /**
> * @ojb.field column="A_NAME"
> * length="40"
> * nullable="false"
> */
> private String name;
> }
>
> /**
> * @ojb.class table="B"
> */
> class B
> {
> /**
> * @ojb.field column="B_ID"
> * nullable="false"
> * primarykey="true"
> * autoincrement="ojb"
> */
> private Integer id;
> /**
> * @ojb.field column="B_NAME"
> * length="40"
> * nullable="false"
> */
> private String name;
> }
>
> /**
> * @ojb.class table="C"
> */
> class C
> {
> /**
> * @ojb.field column="C_ID"
> * nullable="false"
> * primarykey="true"
> * autoincrement="ojb"
> */
> private Integer id;
> /**
> * @ojb.field column="C_NAME"
> * length="40"
> * nullable="false"
> */
> private String name;
> }
>
> /**
> * @ojb.class table="A_B_REL"
> */
> class AandB
> {
> /**
> * @ojb.field column="A_ID"
> * nullable="false"
> * primarykey="true"
> */
> private Integer aId;
> /**
> * @ojb.field column="B_ID"
> * nullable="false"
> * primarykey="true"
> */
> private Integer bId;
> /**
> * @ojb.field column="DISPLAY_SEQUENCE"
> * nullable="false"
> */
> private Integer displaySequence;
> }
>
> /**
> * @ojb.class table="B_C_REL"
> */
> class BandC
> {
> /**
> * @ojb.field column="A_ID"
> * nullable="false"
> * primarykey="true"
> */
> private Integer aId;
> /**
> * @ojb.field column="B_ID"
> * nullable="false"
> * primarykey="true"
> */
> private Integer bId;
> /**
> * @ojb.field column="C_ID"
> * nullable="false"
> * primarykey="true"
> */
> private Integer cId;
> /**
> * @ojb.field column="DISPLAY_SEQUENCE"
> * nullable="false"
> */
> private Integer displaySequence;
> /**
> * @ojb.reference foreignkey="aId,bId"
> */
> private AandB theAandB;
> }
>
>
> The generated repository_user.xml would be:
>
>
> <class-descriptor
> class="A"
> table="A"
> >
> <field-descriptor
> name="id"
> column="A_ID"
> jdbc-type="INTEGER"
> primarykey="true"
> nullable="false"
> autoincrement="true"
> >
> </field-descriptor>
> <field-descriptor
> name="name"
> column="A_NAME"
> jdbc-type="VARCHAR"
> nullable="false"
> length="40"
> >
> </field-descriptor>
> </class-descriptor>
> <class-descriptor
> class="AandB"
> table="A_B_REL"
> >
> <field-descriptor
> name="aId"
> column="A_ID"
> jdbc-type="INTEGER"
> primarykey="true"
> nullable="false"
> >
> </field-descriptor>
> <field-descriptor
> name="bId"
> column="B_ID"
> jdbc-type="INTEGER"
> primarykey="true"
> nullable="false"
> >
> </field-descriptor>
> <field-descriptor
> name="displaySequence"
> column="DISPLAY_SEQUENCE"
> jdbc-type="INTEGER"
> nullable="false"
> >
> </field-descriptor>
> </class-descriptor>
> <class-descriptor
> class="B"
> table="B"
> >
> <field-descriptor
> name="id"
> column="B_ID"
> jdbc-type="INTEGER"
> primarykey="true"
> nullable="false"
> autoincrement="true"
> >
> </field-descriptor>
> <field-descriptor
> name="name"
> column="B_NAME"
> jdbc-type="VARCHAR"
> nullable="false"
> length="40"
> >
> </field-descriptor>
> </class-descriptor>
> <class-descriptor
> class="BandC"
> table="B_C_REL"
> >
> <field-descriptor
>
=== message truncated ===
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]