RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Clute, Andrew
Ok, great. That is exactly how I have it. As we discussed before that is not
working, so I will patiently wait for your fix for this.

I really do appreciate your work and effort in this!

Thanks again!
-Andrew

-Original Message-
From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 12, 2003 5:14 AM
To: OJB Users List
Subject: RE: Xdoclet: How to use base-class properties with different colu
mn names in children?


A field declared in the class javadoc comment is only then not anonymous if
there is a tagged field with that name in a base class of that class. So,
you simply tag the field with @ojb.field in your base class (BusinessObject
if I remember correctly) - this does not require that you also tag the class
- and then the @ojb.field in the class javadoc comment in the subclass will
automatically override the base class tag for the subclass.

E.g.

class BusinessObject
{
  /**
   * @ojb.field column="guid"
   */
  protected String guid;
}

/**
 * @ojb.class
 * @ojb.field name="guid"
 *column="dog_guid"
 */
class Dog extends BusinessObject
{
}

Tom


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

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



RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Andy Czerwonka
Outstanding

On Fri, 2003-09-12 at 05:58, Thomas Dudziak wrote:
> Yes, both the repository descriptor (aka repository_user.xml) and the
> table schema (for Torque which then generates the tables in your
> database) are generated by the xdoclet ojb module.
> If you want to try it out, grab OJB from CVS and look into the contrib
> folder. There you'll find the module along with the xdoclet jars, and the
> documentation for the module.
> 
> Tom
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
andy


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



RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Thomas Dudziak
Yes, both the repository descriptor (aka repository_user.xml) and the
table schema (for Torque which then generates the tables in your
database) are generated by the xdoclet ojb module.
If you want to try it out, grab OJB from CVS and look into the contrib
folder. There you'll find the module along with the xdoclet jars, and the
documentation for the module.

Tom




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



RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Andy Czerwonka
I'd love to learn how your using XDoclet with OJB.  Are you generating
both the DDL and the repository?

On Fri, 2003-09-12 at 03:13, Thomas Dudziak wrote:
> A field declared in the class javadoc comment is only then not anonymous
> if there is a tagged field with that name in a base class of that
> class. So, you simply tag the field with @ojb.field in your base class
> (BusinessObject if I remember correctly) - this does not require that you
> also tag the class - and then the @ojb.field in the class javadoc comment
> in the subclass will automatically override the base class tag for the
> subclass.
> 
> E.g.
> 
> class BusinessObject
> {
>   /**
>* @ojb.field column="guid"
>*/
>   protected String guid;
> }
> 
> /**
>  * @ojb.class
>  * @ojb.field name="guid"
>  *column="dog_guid"
>  */
> class Dog extends BusinessObject
> {
> }
> 
> Tom
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
andy


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



RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-12 Thread Thomas Dudziak
A field declared in the class javadoc comment is only then not anonymous
if there is a tagged field with that name in a base class of that
class. So, you simply tag the field with @ojb.field in your base class
(BusinessObject if I remember correctly) - this does not require that you
also tag the class - and then the @ojb.field in the class javadoc comment
in the subclass will automatically override the base class tag for the
subclass.

E.g.

class BusinessObject
{
  /**
   * @ojb.field column="guid"
   */
  protected String guid;
}

/**
 * @ojb.class
 * @ojb.field name="guid"
 *column="dog_guid"
 */
class Dog extends BusinessObject
{
}

Tom


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



RE: Xdoclet: How to use base-class properties with different colu mn names in children?

2003-09-11 Thread Clute, Andrew
Thanks for the email. I realized after I sent it that my solution was not
the most elegant.

Now, I would like to prepare my code in advance for the changes you make to
make it work for defining changes to attributes of elements already defined
in base types. How does one specify that type of field description to
differentiate it from being an anonymous field? Will you still define it in
the class comment, and mark the access as not anonymous, or will you define
it somewhere else?

Thanks

Andrew

-Original Message-
From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2003 5:20 AM
To: OJB Users List
Subject: RE: Xdoclet: How to use base-class properties with different column
names in children?


It seems you've found a bug in the module. The ability to define fields etc.
in the class javadoc comment is provided to accomplish two things. The first
one is to define anonymous fields and relations. This works. The second one
is to change attributes of elements already defined in base types. This is
your case, and it seems to be not working properly. Your solution however
does not handle the actual problem but only works in your case. I will have
a look at it and fix it ASAP. As for the source code, sadly the module is
still not part of the xdoclet CVS, but you can grab the source from the
xdoclet JIRA space (entry XDT-514 if I'm not mistaken, see the xdoclet page
for details), though the version there is rather old. The next update the
module will come in a couple of days, and then I will update the source code
in JIRA, as well.

Tom


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

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