Ok, well I figured out that the version of Xdoclet-ojb that comes compiled
with RC4 does not have this feature in it.

I downloaded the most recent jar from CVS, and now it works, sort of.

If it put my @ojb.field description in the class comment, it will now had
the field-description, but now it always sets the access="anonymous", even
if I specify an access="readwrite" for that field.

Ways around this?



-----Original Message-----
From: Clute, Andrew [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 10, 2003 3:45 PM
To: '[EMAIL PROTECTED]'
Subject: Xdoclet: How to use base-class properties with different column n
ames in children?


So, let's say I have a base class 'BusinessObject' with a property called
'guid'

So, I have two classes, both extend BusinessObject, named 'dog' and 'cat'.

My database (which already exist), has a field in the tbl_dog table called
"dog_guid", and the tbl_cat has "cat_guid".

Before using Xdoclet to get my repository_user.xml, I would define the
mapping for both dog and cat's guid, cooresponding the appropriate column
name for that table, and the name of the field in the base class.

I can't seem to find the same way to do it in Xdoclet-ojb -- It seems I have
to have a property named "guid" in each of my child classes to attach an
xdoclet tag to it.

I have tried this:

<code>
/**
 * @ojb.class table="tbl_cat"
 *                        include-inherited="true"      
 * @ojb.field name="guid"
 *            column="cat_guid"
 *            jdbc-type="VARCHAR"
*/
Public class Cat extends BusinessObject
</code>

But, it doesn't create the reference in the xml file. However, if I put a
property called guid in the dog and cat classes, and the tag that, it works
-- but that stinks because I am killing OO.

Thoughts?

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

Reply via email to