Hello, I am new to OJB and am using the OJB XDoclet.  I have a foreign key
relationship between two classes.  In the class making the reference, there
must be a field specified for the ID of the foreign key - but I have no need
for this field (since I have a reference to the object itself).  Is it
possible to not include this field? (OJB XDoclet does not produce the
correct schema if this ID field is removed.)  Is this a limitation of the
OJB XDoclet or OJB itself?

This is illustrated in the OJB XDoclet in the foreign key reference example.
Why does one need to have a reference to both productGroup and
productGroupID?

        /**
         * @ojb.reference class-ref="org.apache.ojb.broker.ProductGroup"
         *                foreignkey="productGroupId"
         * @ojb.documentation this is the reference to an articles
productgroup
         * @ojb.attribute attribute-name="color"
         *                attribute-value="red"
         * @ojb.attribute attribute-name="size"
         *                attribute-value="tiny"
         */
        protected InterfaceProductGroup productGroup;
        /**
         * @ojb.field
         */
        protected int productGroupId;

-mike


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to