-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Andrew
Stevens
Sent: Wednesday, July 03, 2002 7:12 PM
To: [EMAIL PROTECTED]
Subject: RE: [Xdoclet-user] Empty Bean causes problems
A wise old hermit known only as Ara Abrahamian <[EMAIL PROTECTED]> once
said:
> > The first problem is that an empty constructor is generated for the
> > Data
> > Object, presumably alongisde a constructor which takes all of the
> > attributes.
> > Because my Bean has no attributes (except those inherited) I end up
> > with 2 empty constructors.
>
> What's the use of a data object without any attributes in it?
A common ancestor for the data objects of descendant EJBs? "Component
inheritence" rears its ugly head again :-)
> > The second problem is just that the same thing happens in the PK
> > object.....I get a 2nd constructor which takes no parameters....and
> yet it
> > *does* set the inherited PK attribute within the body.
>
> Same problem, same solution as described above :-)
Hang on a second, Ara - didn't we already fix this ages ago? Certainly
there's <XDtEjbPersistent:ifHasAtLeastOnePkField> and
<XDtEjbPersistent:ifHasAtLeastOnePersistentField> tags around the
with-argument constructors in the templates. I'm pretty sure that was to
fix this situation (and the PK one was added in December, before v1.1.1!)
> > The 3rd problem, also related, is that the "toString()" method in the
> > Data
> > Object calls the append method on the string buffer with the
> > attributes as
> > parameters; because there are no attributes this results in a call
> > with no
> > parameters:
> > str.append();
> > which is also invalid Java and causes a compile time error.
Ditto, the template uses
<XDtEjbPersistent:ifHasAtLeastOnePersistentField>
str.append(<XDtEjbPersistent:persistentfieldNameValueList/>);
</XDtEjbPersistent:ifHasAtLeastOnePersistentField>
to try and avoid just this problem.
Chris, it sounds like either there's a regression bug or there's something
about your bean that confuses this test. Can you post your beans' code
or, preferably, raise a bug report and attach the code so we can play
around with it ourselves?
Andrew.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
No, I will not fix your computer.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user